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
If a person consumes an extra 500 calories per day, how long would it take before he or she gained one pound of fat?
Ostrovityanka [42]
The answer is A. 10 days
6 0
3 years ago
What is alpha, beta and gamma radiation made of
algol13

Answer:

Alpha radiation is the name for the emission of an alpha particle in fact an helium nuclei, beta radiation is the emission of electrons or positrons , and gamma radiation is the term used for the emission of energetic photons.

Explanation:

6 0
1 year ago
Which disease do you think is most easily spread? 5 Answers
Anika [276]

Answer:

coronavirus

sida

tuberculosis

sifilis

epatitis

Explanation:

7 0
3 years ago
Does a basketball, baseball, tennis ball, or marble MOST LIKELY have the smallest volume?
Fantom [35]
Marble i think not quite sure doe
4 0
3 years ago
Read 2 more answers
 Acid precipitation is caused by a mix of 
saveliy_v [14]
C. sulfur dioxide, carbon dioxide, and nitrogen oxides

These three chemical compounds play a role in the chemistry of acid rain or acid precipitation. These compounds are then in the process as they evaporate are converted into acids, mainly, nitric acid and sulfuric acid. These toxic gases that composes acid precipitation is actually caused by industries, factories or plants that utilizes such chemicals and then uses a humongous amount which then is released in during the process of certain products or manufactured objects.



4 0
3 years ago
Other questions:
  • Serena is a research student who has conducted an experiment on the discoloration of marble. Read about Serena’s experiment. The
    9·1 answer
  • How strongly the planet you're on Pulls on you
    6·2 answers
  • Potential energy of an apple is 6j. the apple is 3.00m high. what is the mass of the apple?​
    13·1 answer
  • A constant magnetic flux through a closed loop of wire induces an emf in that loop. True or false?
    13·1 answer
  • Alex goes cruising on his dirt bike. He rides 700m north, 300m east, 400m north, 600m west, 1200m south, 300m east and finally 1
    13·1 answer
  • The contraction of muscles in the stomach walls
    11·1 answer
  • The word “cumulative” means that something builds on itself. Which example best shows how scientific knowledge is cumulative? A.
    13·1 answer
  • baseball player hits a line drive estimated to have traveled 145 meters the ball leaves the bat with a horizontal velocity of 40
    8·1 answer
  • What is the relationship between the density of a substance and the speed of sound through that substance?
    10·1 answer
  • Leslie is investigating which brand of cell phone has the longest lasting battery.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!