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
N76 [4]
3 years ago
10

Consider the following code segment.

Computers and Technology
1 answer:
m_a_m_a [10]3 years ago
8 0

Answer:

10 20                                                                                                                          

30 40                                                                                                                          

50 60

Explanation:

Given

The above code segment

Required

What is printed, if anything

To do this, we analyze the code line by line.

Line 1: The first line creates a 4 by 3 array named mat

Line 2: for (int[] row : mat) {  -> This creates row[] array which represents each row of array mat

Line 3: for (int j = 0; j < row.length; j += 2){ -> This iterates through the even indexed elements of the row array i.e. 0 and 2

Line 4: System.out.print(row[i] + " "); -> This prints the even indexed elements of the row array.

The even indexed elements are: 10, 20, 30, 40, 50 and 60

Line 5: System.out.println(); --> This prints a new line

You might be interested in
A __________ note is a private note that you leave for yourself or for other people who might use the presentation file
BaLLatris [955]

Answer:

The answer is that it is a speaker note.

Explanation:

It leaves a note for people that use presentation files. I use it all the time on my google slides.

7 0
2 years ago
Una pregunta cuales son los ataques de Sindel que por favor y me lo diga gracias
Len [333]
I do not know spanish please say in english
5 0
3 years ago
_____ assures the interface will act as the users expect, while _____ assures it will look pleasing. Select one:
Agata [3.3K]

Answer:

C. consistency, aesthetics

Explanation:

Based on the descriptions given to us in the question we can deduce that the answer is C. consistency, aesthetics. This is because "consistency" is defined as something that always delivers the same results, which is what users need from the interface in order to understand it and continue using it. While "aesthetics" is defined as the visual representation of something (how something will look).

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

7 0
3 years ago
Create a class named Employee. The class must contain member variables for the employee name and salary. It should contain gette
Lerok [7]

Answer:

Explanation:

The following code was written in Java. The code contains the Employee class which contains the two variables (name, salary), the constructor, getter and setter methods for both variables, and an overwritten toString method. It also contains a tester class with the main method inside and creates a Employee object and initializes it. Then it calls the toString method. The output can be seen in the attached image below. Due to technical difficulties I have added the code as a txt file below.

8 0
3 years ago
Which of the following should get a didn't load flag? Select all that apply
Elza [17]
I think it is c a completely blank page but I’m not 100% on it though
3 0
3 years ago
Other questions:
  • Abigail is interested in connecting her tablet that usually connects to a wireless network, to her personal computer that usuall
    11·2 answers
  • Periodically adding, changing and deleting file records is called file. A) Updating B) Upgrading C) Restructuring D) Renewing E)
    10·2 answers
  • Convert the following decimal number to its equivalent binary ,octal,hexadecimal 1920​
    12·1 answer
  • Which searching method requires that the list be sorted?
    5·1 answer
  • By default, windows does not display ____________________ in windows explorer.
    8·1 answer
  • Stress results from _______. A. Outside stimulus b. Internal stimulus c. Outside calm d. Internal calm
    12·2 answers
  • Which part is the author’s address?
    5·1 answer
  • When searching the web software programs called fetch a few web pages and then they follow the links on those pages and fetch th
    9·2 answers
  • In what ways do you think the media should function in a democratic society?
    9·1 answer
  • I need help also this counts as my second giveaway and last for today
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!