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
Substances can undergo physical changes or chemical changes. what is the difference between these two kinds of changes
soldi70 [24.7K]
Physical changes are those change which just externally or physically change the state of the object . for example : water boils and evaporates... here the state is just changing from liquid to vapour while the composition is the same.

chemical changes are those which bring about a change in the composition of a substance. for example: burning of paper changes into ash .
8 0
3 years ago
Read 2 more answers
Describe and contrast inversion and eversion?
Kitty [74]

Answer:

inversion would be going toward or inside internal and eversion is going outside or external

7 0
3 years ago
A satellite is launched to orbit the Earth at an altitude of 2.90 x10^7 m for use in the Global Positioning System (GPS). Take t
marin [14]

Answer:

T=66262.4s

Explanation:

From the question we are told that:

Altitude A=2.90 *10^7

Mass m=5.97 * 10^{24} kg

Radius r=6.38 *10^6 m.

Generally the equation for Satellite Speed is mathematically given by

V=(\frac{GM}{d} )^{0.5}

V=(\frac{6.67*10^{-11}*5.97 * 10^{24}}{6.38 *10^6+2.90 *10^7} )^{0.5}

V=3354.83m/s

Therefore

Period T is Given as

T=\frac{2 \pi *a}{V}

T=\frac{2 \pi *(6.38 *10^6+2.90 *10^7}{3354.83}

T=66262.4s

4 0
2 years ago
Based on the data, which prediction should he expect to occur? A2 repels B1. C2 attracts B2. B1 repels C1. A1 attracts C2.
VladimirAG [237]
I believe the answer is a1
6 0
2 years ago
When conduction electrons pass through a device with resistance, which describes their energy?
Aleksandr-060686 [28]

Answer:

a) their potential energy increases.

Explanation:

Ohm's Law is

R= V/I

Where R= Resistance

V= potential difference or potential energy

I= current or conduction electron flow rate

Clearly R and V are directly proportional i-e Potential energy increases with resistance.

3 0
2 years ago
Other questions:
  • Which element does not nomally form chemical bonds?
    9·1 answer
  • A vector quantity has direction, a scalar quantity does not <br> true <br> or<br> false
    13·2 answers
  • Arnold Schwarzenegger is moving out of his California mansion. He pushes a box of books on the floor with a force of 50 N to the
    7·1 answer
  • If the speed of light in a vacuum is twice that of the speed of light in a given material, what is the index of infraction for t
    8·2 answers
  • Which force does not operate at a distance of 1 m?
    10·2 answers
  • Someone pls help! My physics quiz is today:(
    11·2 answers
  • The answer is b :)
    8·2 answers
  • For a series circuit:
    5·1 answer
  • 5.
    5·1 answer
  • Can something move horizontally and vertically at the same time? Yes! Why? No! Why not?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!