Consider the program below:public class Test{ public static void main(String[] args) {Int[] a;a = new int[10];for(int i = 0; i < 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
Solved
Show answers
More tips
- F Family and Home How to Remove Tar Stains: Tips and Recommendations from Experts...
- F Family and Home How to Remove Fading from Clothes: Tips and Tricks...
- S Sport How to Do a Jumping Split...
- H Health and Medicine How Did Inna Lose Weight on Dom 2?...
- F Family and Home How to Properly Fold Napkins in a Napkin Holder?...
- F Food and Cooking How to Set Up Ventrilo - The Ultimate Guide...
- S Science and Technology How to Make a Homemade Smoker: The Ultimate Guide...
- A Auto and Moto Battle for the Relocation of The Cherkizovsky Market: Who Won?...
- C Computers and Internet How Do You Refill Cartridges?...
- S Style and Beauty Tricks and Tips: How to Get Rid of Freckles...
Answers on questions: Physics
- P Physics According to the law of conservation of matter, the number of is not changed by a chemical reaction. A. products B. molecules C. atoms D. bonds...
- P Physics How much acceleration is produced when 500 N force is imposed upon the object of 10 kg mass If the object start to move from the rest how far does the object travel at...
- P Physics A stone is thrown horizontally at a speed of 8.0 m/s from the edge of a cliff 80 m in height. How far from the base of the cliff will the stone strike the ground?...
- P Physics A car speeds past a stationary police officer while traveling 135 km/h. The officer immediately begins pursuit at a constant acceleration of 11.8 km/h/s, just as the driver...
- E English Relate to an incident / experience that have enhanced your self - confidence greatly...
- M Mathematics 5 (F - 32) expresses the relationship between Fahrenheit temperature, F, and Celsius temperature, C. Use the formula to convert the given Fahrenheit temperature to its...
- H History The Articles of Confederation was the first American constitution; it created a loose alliance of 13 independent state s....
- M Mathematics HELP ASAP PLEASE Look at the equations above....
- M Mathematics When you add 18 to 1/4 of a number, you get the number itself. The equation(s) that may be used to solve this problem is (let n = number):...
- M Mathematics Point A(-3,-2) is reflected in the line y = x. What are the coordinates of A?...
Ответ:
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.
Ответ:
The financial planning has roughly the same structure. Even in their later stages of life, they need to prepare and pre-save for any major risks that may occur. Having a spouse and children may increase this risk as well. It’s important to set aside a little future college money for their kids, maybe an allowance, ect. Their savings when it comes to risk management should also be increased. Having to not only prepare for accidents with themselves, they now also have to prepare for any accidents including their children and spouse. Saving money for assets is also important, going in debt would put the whole family in danger so making sure house/apartment payments, car payments, taxes, ect., is needed.