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
A magnetic compass is placed near an insulated copper wire. When the wire is connected to a battery and a current is created, th
lawyer [7]

Explanation:

When the wire is connected to a battery, the compass needle moves and changes its position. This happens because the needle magnetizes the copper wire, thus,  creating a force.

While the current in the wire produces a magnetic field and exerts a force on the needle. The insulation on the wire becomes energized and exerts a force on the needle. Hence, the compass needle moves and changes its position.

6 0
3 years ago
Suppose a large truck on a hydraulic lift exerts 7,000 N of force on a piston with an area of 0.4 m2. The piston can only suppor
uysha [10]

Pressure is the amount of force per unit area. In formula it is,

P = F ÷ A

P = 7000 N ÷ 0.4 m2

P = 17,500 N/m2

The amount of pressure the truck exerts on the piston is 17,500 N/m2

7 0
3 years ago
A biker pedals hard to ride his bike to the top of a 44 m hill. He decides to let his bike coast down the hill, and is having so
Dafna11 [192]

Answer:

The bikers speed at the top of other hill is <u>25.82 m/s.</u>

Explanation:

Considering the biker is riding on a frictionless surface.

∴ There is no non-conservative or external force acting on the biker.

Hence we can conserve the energy of biker and bike as a system.

Let,

h_{1} = 44m

h_{2} = 10m

Since the biker starts from rest , his initial speed v_{1} = 0 m/s

Let final speed of the bike at the top of other hill be v_{2}.

∴ Initial Energy (at the top of 44m hill) = mgh_{1}

  Final Energy  (at the top of 10m hill) =  mgh_{2} + \frac{1}{2}mv_{2} ^{2}.

Conserving both the energies , we get

mgh_{1} = mgh_{2} + \frac{1}{2}mv_{2} ^{2}

∴ v_{2} = \sqrt{2g(h_{1}-h_{2} )}

Substituting the values for g , h_{1} , h_{2} , we get

v_{2} = 25.82 m/s

6 0
3 years ago
- What do the objects not in motion have in common?​
Semenov [28]

Answer:

they have zero velocity

Explanation:

8 0
4 years ago
What are some of the negative effects of ecotourism on an ecosystem?
oksano4ka [1.4K]
Tons of stuff!
Footpath erosion, increased usage of travel vehicles, construction of hotels and other attractions, ect ect. 
4 0
3 years ago
Other questions:
  • A group of pedestrians is standing on a corner, waiting for the light to change. A driver runs the red light and narrowly misses
    6·1 answer
  • "The White Shark" allows riders to start from rest on a tube and then slide down a 44 meter slide. It takes the rider 6.2 second
    9·1 answer
  • In general, fitness evaluations are meant to help you measure your physical fitness against those of similar age and gender
    5·2 answers
  • An electron experiences a force of magnitude F when it is 5 cm from a very long, charged wire with linear charge density, lambda
    14·1 answer
  • Future space stations will create an artificial gravity by rotating. Consider a cylindrical space station 780 m diameter rotatin
    13·1 answer
  • An inflatable raft (unoccupied) floats down a river at an approximately constant speed of 5.6 m/s. A child on a bridge, 71 m abo
    13·1 answer
  • If the strength of the magnetic field at A is 48 units and the strength of the magnetic field at B is 3 units, what is the dista
    8·1 answer
  • Which statement is correct about how the temperature of an object changes?
    13·1 answer
  • 29. Jorge is conducting an investigation into perfectly inelastic collisions using equipment where two carts collide with
    11·1 answer
  • Enny and Anne wanted to see who could throw a ball the hardest. They decided to each throw a ball against a wall as hard as they
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!