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
laiz [17]
3 years ago
8

Consider the program below:public class Test{ public static void main(String[] args) {Int[] a;a = new int[10];for(int i = 0; i &

lt; a.length; i++)a[i] = i + 2;int result = 0;for(inti = 0; i < a.length; i++)result += a[i];System.out.printf("Result is: %d%n", result); } }The output of this program is:a. 62b. 64c. 65d. 67
Physics
1 answer:
ivolga24 [154]3 years ago
6 0

Answer:

c. 65

Explanation:

The output is 65.

An array of length 10 is created first. Then, the first for-loop fill the array with different values; The array element now become: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11. The array element are generated using the equation a[i] = i + 2; so when i is 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. i must be less than the array length (10).

a[0] = 0 + 2 = 2

a[1] = 1 + 2 = 3

a[2] = 2 + 2 = 4

a[3] = 3 + 2 = 5

a[4] = 4 + 2 = 6

a[5] = 5 + 2 = 7

a[6] = 6 + 2 = 8

a[7] = 7 + 2 = 9

a[8] = 8 + 2 = 10

a[9] = 9 + 2 = 11

result variable is declared and initialized to 0.

The second for-loop goes through the array and add individual element to result.

You might be interested in
Which of the following is not a characteristic of S waves?
9966 [12]
Number a is a correct one
7 0
3 years ago
Consider the free-body diagram. If you want the box to move, the force applied while dragging must be greater than the
VLD [36.1K]

You would want it to be greater than D. friction force

It needs be greater than the friction applied to it.

6 0
3 years ago
Calculate the velocity of a car traveling in a straight path due east with a distance of 16 meters in 2 seconds.
USPshnik [31]
C. 8 m/s is the answer
8 0
3 years ago
Read 2 more answers
A student says that the two terms speed and frequency of the wave refer to the same thing. What is your response?
rjkz [21]

Answer:

He is wrong!

Explanation:

Frequency refers to how many wave lengths pass in a second and speed is how fast the wave is traveling for example the speed of light goes really fast but has a mid-level frequency.

Hope this helps! ;-)

3 0
2 years ago
Consider a metal rod of uniform temperature. Is it possible that heat spontaneously flow from one end of the rod to the other en
raketka [301]

Answer:

No its not possible in that yes heat flow is due to temperature different but with time equilibrium in temperature is reached hence there is no temperature difference at both ends at this time

4 0
3 years ago
Other questions:
  • The amount of friction divided by the weight of an object forms a unit less number called the blank of friction
    15·1 answer
  • Hey guys I really really need help with this question for ASAP! Explain what chart junk is and how it differs from the kind of i
    13·2 answers
  • Why is it possible to throw a 0.145 kg baseball much further than a 7 kg bowling ball?
    13·1 answer
  • HELP PLZ HELPPPPPPPPPPPPPPPPPPPPPPP I need help
    5·1 answer
  • A paleontologist estimates that when a particular rock formed, it contained 12 mg of the radioactive isotope potassium-40, which
    7·1 answer
  • In an elastic collision, a 580 kg bumper car collides directly from behind with a second, identical bumper car that is traveling
    11·1 answer
  • Which of the following statements about the resistsance of a wire is correct? Select THREE answers.
    11·1 answer
  • Calculate the equivalent of 20 degrees Celsius in degrees Fahrenheit and Kelvin.
    8·1 answer
  • A sample of gas has an initial volume of 23.6 l at a pressure of 1.52 atm . if the sample is compressed to a volume of 10.5 l: ,
    11·1 answer
  • How does energy affect wavelength
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!