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

Author Question: A variable declared in the for loop control can be used after the loop exits. (Read 35 times)

anshika

  • Hero Member
  • *****
  • Posts: 510

Question 1

What is the output of the following code?

for ( ; false ; )
System.out.println("Welcome to Java");

◦ prints out Welcome to Java two times
◦ does not print anything
◦ prints out Welcome to Java forever
◦ prints out Welcome to Java one time

Question 2

A variable declared in the for loop control can be used after the loop exits.
◦ true
◦ false


Related Topics

Need homework help now?

Ask unlimited questions for free

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

sultansheikh

  • Sr. Member
  • ****
  • Posts: 335
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




anshika

  • Member
  • Posts: 510
Reply 2 on: May 6, 2020
Excellent


xoxo123

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

 

Did you know?

Normal urine is sterile. It contains fluids, salts, and waste products. It is free of bacteria, viruses, and fungi.

Did you know?

The types of cancer that alpha interferons are used to treat include hairy cell leukemia, melanoma, follicular non-Hodgkin's lymphoma, and AIDS-related Kaposi's sarcoma.

Did you know?

Studies show that systolic blood pressure can be significantly lowered by taking statins. In fact, the higher the patient's baseline blood pressure, the greater the effect of statins on his or her blood pressure.

Did you know?

The first monoclonal antibodies were made exclusively from mouse cells. Some are now fully human, which means they are likely to be safer and may be more effective than older monoclonal antibodies.

Did you know?

Many medications that are used to treat infertility are injected subcutaneously. This is easy to do using the anterior abdomen as the site of injection but avoiding the area directly around the belly button.

For a complete list of videos, visit our video library