1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
insens350 [35]
3 years ago
9

What is the printout (display) of the following program? public class Test { public static void main(String[] args) { int[][] va

lues = {3, 4, 5, 1}, {33, 6, 1, 2}; int v = values[0][0]; for (int row = 0; row < values.length; row++) for (int column = 0; column < values[row].length; column++) if (v < values[row][column]) v = values[row][column]; System.out.print(v); } }
Computers and Technology
1 answer:
vodka [1.7K]3 years ago
8 0

Answer:

The printout of the program is 33

Explanation:

Given the code as follows:

  1.        int[][] values = {{3, 4, 5, 1}, {33, 6, 1, 2}};
  2.        int v = values[0][0];
  3.        for (int row = 0; row < values.length; row++)
  4.            for (int column = 0; column < values[row].length; column++)
  5.                if (v < values[row][column])
  6.                    v = values[row][column];
  7.                System.out.print(v);

The code above will find the largest value from the two-dimensional array and print it out.

The logic of finding the largest value is as follows:

  • Create a variable, <em>v</em>, to hold the largest number (Line 2). At the first beginning, we simply set the value from the first row and first column (values[0][0])  as our current largest value.
  • Next, we need to compare our current largest value against the rest of the elements in the two dimensional array.
  • To make the comparison, we need a two-layers for loops that will traverse through every row and column of the array and compare each of the element with the current largest value (Line 3-6).
  • If the current largest value, v, is smaller than any element of the array, update the <em>v</em>  to the latest found largest value (Line 5-6).
  • After completion of the for-loop, the v will hold the largest number and the program will print it out (Line 8).
You might be interested in
Is discord down right now?
Eva8 [605]

Answer:

yes it is

Explanation:

To do this, visit discord.com and login to the web version. Once logged in using the right credentials launch the app on your PC, discord should work properly now. Ensure the system is up to date. As a last resort, uninstall and reinstall the app again.

3 0
3 years ago
IOS 0R ANDR0ID ???
Lera25 [3.4K]

Answer:

Both are awesome!

Explanation:

One thing we shouldn't do is downgrade others for having an android or calling someone basic because they have ios. Both have their pros and cons, but idk because I don't have a phone! Hehe. But my family primarily uses IOS.

3 0
3 years ago
List and briefly describe passive and active security attacks.
Rama09 [41]

Answer:

Passive security attack are the unauthorized disclosure in the network attack. In this type of security attack a system are use for monitoring and sometimes scanning the open port. It basically include the monitoring the unprotected data and traffic analysis.

On the other hand, active security system modify the transmitted data and gain the unauthorized access from the computer system.

This type of security attack basically monitor the file transfer and electronic mail from the attacks which can be pass in the form of viruses in the computer system.

4 0
2 years ago
How does the rhythm of "The Raven" compare to "Casey at the Bat?"
katen-ka-za [31]

Answer:

Casey at the Bat: A Ballad of the Republic Sung in 1888' is the full title of an American poem written by Ernest Lawrence Thayer. The poem tells the story of the final half-inning of a baseball game. ... Not only is it a love song to the dramatic sport of baseball, but it is a ballad to 'the Republic in 1888'.

8 0
3 years ago
Information systems (is) users have no responsibility to follow security and backup procedures. group of answer choices true fal
Sauron [17]

The statement 'information systems (IS) users have no responsibility to follow security and backup procedures' is false.

Any kind of data that is available on the Internet has to be protected. All information users have the responsibility to follow the security procedures so that an unwanted circumstance does not arise. Hence, the statement above is false.

It is the responsibility of an organization to protect its data. For this reason, everyone, including the information systems (IS) users is entitled to follow security and backup procedures.

One should recognize that all these security and backup procedures are for our own security as data misplaced can be a loss to the whole organization. Security and backup procedures also help to keep data safe from hackers.

To learn more about information systems, click here:

brainly.com/question/25226643

#SPJ4

3 0
1 year ago
Other questions:
  • What does the use of color and images on a blog refer to?
    10·2 answers
  • Your school computer library has a network that connects computers and devices within a few small rooms. what type of network do
    7·1 answer
  • Who is the CEO of Quora?
    15·1 answer
  • Explain demand paging with a proper example
    8·1 answer
  • An Oven Is Just A Spicy Refrigerator? Yes Or No??
    9·2 answers
  • If you are logged on to Windows Live Messenger, why would you be unable to engage
    6·1 answer
  • What is the sequence of instructions performed to execute one program instruction
    13·1 answer
  • What is professional education? <br><br><br><br><br>Please help me to do this.​
    7·2 answers
  • A server is handling thousands of simultaneous connections, and proxying requests to another service. Which concurrency model is
    9·1 answer
  • I need some help-
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!