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 boy standing at one end of a floating raft that is stationary relative to the shore walks to the opposite end of the raft, awa
lapo4ka [179]

Answer:

The raft moves towards the shore

Explanation:

6 0
3 years ago
A scientist designed a foam container to help keep frozen foods from melting. Which best explains how the foam works?
FrozenT [24]
I think the answer should be D.<span>It reduces the amount of thermal energy that is transferred from outside to inside the container. </span>
6 0
4 years ago
Read 2 more answers
If an object has a constant acceleration, it must be changing velocity at the same rate over and over again..TrueFalse
Dimas [21]
If its accel is constant and not changing from its number then the velocity is changing so True
4 0
3 years ago
Which describes the characteristics of a liquid?
Viktor [21]
The right answer is B because a liquid can take the shape of anything its in but it has the same volume
3 0
3 years ago
Can someone help meeeeee... show how to solve it plzzzzzzzz
liubo4ka [24]
<h2>Right answer: 64 units</h2><h2></h2>

According to the law of universal gravitation, which is a classical physical law that describes the gravitational interaction between different bodies with mass:

F=G\frac{m_{1}m_{2}}{r^2}

Where:

F is the module of the force exerted between both bodies

G is the universal gravitation constant.

m_{1} and m_{2} are the masses of both bodies.

r is the distance between both bodies

In this case we have a gravitation force F_{1}=16units, given by the formula written at the beginning. Let’s rename the distance r as d:

F_{1}=G\frac{m_{1}m_{2}}{d^2}     (1)

And we are asked to find the gravitation force F_{2} with a given distance of \frac{d}{2}:

F_{2}=G\frac{m_{1}m_{2}}{({\frac{d}{2})}^{2}}      

F_{2}=G\frac{m_{1}m_{2}}{{\frac{d^{2}}{4}}}     (2)

The gravity constant is the same for both equations, and we are assuming both masses are constants, as well. So, let’s isolate G m_{1}m_{2} in both equations:

From (1):

Gm_{1}m_{2}=F_{1}{d}^{2}     (3)

From (2):

Gm_{1}m_{2}=F_{2}\frac{{d}^{2}}{4}     (4)

If (3)=(4):

F_{1}{d}^{2}=F_{2}\frac{{d}^{2}}{4}     (5)

Now we have to find F_{2}:

F_{2}=F_{1}{d}^{2}\frac{4}{{d}^{2}}      

F_{2}=4F_{1}     (6)

If F_{1}=16 units:

F_{2}=(4)(16 units)        

F_{2}=64 units>>>>This is the new force of attraction     

3 0
3 years ago
Other questions:
  • 5400 J of energy are given off when a 50 g of aluminum pan changes temperature. Does the Temperature of the pan increase or decr
    12·1 answer
  • According to the particle theory of matter: (a) How is the motion of particles in a liquid different from the motion of particle
    5·1 answer
  • A 0.05 kg tennis ball moves at a speed of 10 m/s and is struck by a racket causing it to rebound in the
    6·2 answers
  • There are fiber optic telephone cables connecting North America and Europe, lying on the bottom of the Atlantic ocean. The wire
    11·1 answer
  • how long does it take to go home in seconds if the distances is 50 meters and i travel 25 meters per minute?
    9·1 answer
  • Describe the adaptive (evolutionary) significance of organizing genes into chromosomes.i.allows for genetic variation in the pro
    9·1 answer
  • A force of 14 lb is required to hold a spring stretched 4 in. beyond its natural length. How much work W is done in stretching i
    11·1 answer
  • 4. What is the period of the microwaves in the above question?
    8·1 answer
  • HELPPPP PLEASEEE!!!!!
    8·1 answer
  • What classification level is more general than order and more specific than phylum?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!