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 32 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
Gracias!


recede

  • Member
  • Posts: 315
Reply 3 on: Yesterday
Great answer, keep it coming :)

 

Did you know?

Walt Disney helped combat malaria by making an animated film in 1943 called The Winged Scourge. This short film starred the seven dwarfs and taught children that mosquitos transmit malaria, which is a very bad disease. It advocated the killing of mosquitos to stop the disease.

Did you know?

About one in five American adults and teenagers have had a genital herpes infection—and most of them don't know it. People with genital herpes have at least twice the risk of becoming infected with HIV if exposed to it than those people who do not have genital herpes.

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."

Did you know?

As many as 20% of Americans have been infected by the fungus known as Histoplasmosis. While most people are asymptomatic or only have slight symptoms, infection can progress to a rapid and potentially fatal superinfection.

Did you know?

The Centers for Disease Control and Prevention has released reports detailing the deaths of infants (younger than 1 year of age) who died after being given cold and cough medications. This underscores the importance of educating parents that children younger than 2 years of age should never be given over-the-counter cold and cough medications without consulting their physicians.

For a complete list of videos, visit our video library