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 30 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
Thanks for the timely response, appreciate it


ASDFGJLO

  • Member
  • Posts: 335
Reply 3 on: Yesterday
YES! Correct, THANKS for helping me on my review

 

Did you know?

When taking monoamine oxidase inhibitors, people should avoid a variety of foods, which include alcoholic beverages, bean curd, broad (fava) bean pods, cheese, fish, ginseng, protein extracts, meat, sauerkraut, shrimp paste, soups, and yeast.

Did you know?

Human stomach acid is strong enough to dissolve small pieces of metal such as razor blades or staples.

Did you know?

Always store hazardous household chemicals in their original containers out of reach of children. These include bleach, paint, strippers and products containing turpentine, garden chemicals, oven cleaners, fondue fuels, nail polish, and nail polish remover.

Did you know?

The immune system needs 9.5 hours of sleep in total darkness to recharge completely.

Did you know?

ACTH levels are normally highest in the early morning (between 6 and 8 A.M.) and lowest in the evening (between 6 and 11 P.M.). Therefore, a doctor who suspects abnormal levels looks for low ACTH in the morning and high ACTH in the evening.

For a complete list of videos, visit our video library