This topic contains a solution. Click here to go to the answer

Author Question: Analyze the following code:public class Test { public static void main (String args[]) {int i = ... (Read 44 times)

silviawilliams41

  • Hero Member
  • *****
  • Posts: 560
Analyze the following code:

public class Test {
public static void main (String args[]) {
int i = 0;
for (i = 0; i < 10; i++);
System.out.println(i + 4);
}
}

◦ The program compiles despite the semicolon (;) on the for loop line, and displays 4.
◦ The for loop in this program is same as for (i = 0; i < 10; i++) { }; System.out.println(i + 4);
◦ The program has a compile error because of the semicolon (;) on the for loop line.
◦ The program compiles despite the semicolon (;) on the for loop line, and displays 14.


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by silviawilliams41 on May 6, 2020

kescobar@64

  • Sr. Member
  • ****
  • Posts: 324
Lorsum iprem. Lorsus sur ipci. Lorsem sur iprem. Lorsum sur ipdi, lorsem sur ipci. Lorsum sur iprium, valum sur ipci et, vala sur ipci. Lorsem sur ipci, lorsa sur iprem. Valus sur ipdi. Lorsus sur iprium nunc, valem sur iprium. Valem sur ipdi. Lorsa sur iprium. Lorsum sur iprium. Valem sur ipdi. Vala sur ipdi nunc, valem sur ipdi, valum sur ipdi, lorsem sur ipdi, vala sur ipdi. Valem sur iprem nunc, lorsa sur iprium. Valum sur ipdi et, lorsus sur ipci. Valem sur iprem. Valem sur ipci. Lorsa sur iprium. Lorsem sur ipci, valus sur iprem. Lorsem sur iprem nunc, valus sur iprium.
Answer Preview
Only 25% of students answer this correctly




silviawilliams41

  • Member
  • Posts: 560
Reply 2 on: May 6, 2020
:D TYSM


Animal_Goddess

  • Member
  • Posts: 339
Reply 3 on: Yesterday
Thanks for the timely response, appreciate it

 

Did you know?

The most dangerous mercury compound, dimethyl mercury, is so toxic that even a few microliters spilled on the skin can cause death. Mercury has been shown to accumulate in higher amounts in the following types of fish than other types: swordfish, shark, mackerel, tilefish, crab, and tuna.

Did you know?

Cutaneous mucormycosis is a rare fungal infection that has been fatal in at least 29% of cases, and in as many as 83% of cases, depending on the patient's health prior to infection. It has occurred often after natural disasters such as tornados, and early treatment is essential.

Did you know?

Despite claims by manufacturers, the supplement known as Ginkgo biloba was shown in a study of more than 3,000 participants to be ineffective in reducing development of dementia and Alzheimer’s disease in older people.

Did you know?

Hypertension is a silent killer because it is deadly and has no significant early symptoms. The danger from hypertension is the extra load on the heart, which can lead to hypertensive heart disease and kidney damage. This occurs without any major symptoms until the high blood pressure becomes extreme. Regular blood pressure checks are an important method of catching hypertension before it can kill you.

Did you know?

People with alcoholism are at a much greater risk of malnutrition than are other people and usually exhibit low levels of most vitamins (especially folic acid). This is because alcohol often takes the place of 50% of their daily intake of calories, with little nutritional value contained in it.

For a complete list of videos, visit our video library