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 34 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
Great answer, keep it coming :)


upturnedfurball

  • Member
  • Posts: 334
Reply 3 on: Yesterday
Wow, this really help

 

Did you know?

Bacteria have been found alive in a lake buried one half mile under ice in Antarctica.

Did you know?

To prove that stomach ulcers were caused by bacteria and not by stress, a researcher consumed an entire laboratory beaker full of bacterial culture. After this, he did indeed develop stomach ulcers, and won the Nobel Prize for his discovery.

Did you know?

Inotropic therapy does not have a role in the treatment of most heart failure patients. These drugs can make patients feel and function better but usually do not lengthen the predicted length of their lives.

Did you know?

The most common childhood diseases include croup, chickenpox, ear infections, flu, pneumonia, ringworm, respiratory syncytial virus, scabies, head lice, and asthma.

Did you know?

The Babylonians wrote numbers in a system that used 60 as the base value rather than the number 10. They did not have a symbol for "zero."

For a complete list of videos, visit our video library