Biyernes, Hulyo 22, 2011

Q&A Java Language 5


  1. The most basic control flow statement supported by the Java programming language is the ___ statement.
  2. The ___ statement allows for any number of possible execution paths.
  3. The ___ statement is similar to the while statement, but evaluates its expression at the ___ of the loop.
  4. How do you write an infinite loop using the for statement?
  5. How do you write an infinite loop using the while statement?


  1. The most basic control flow statement supported by the Java programming language is the if-then statement.
  2. The switch statement allows for any number of possible execution paths.
  3. The do-while statement is similar to the while statement, but evaluates its expression at the bottom of the loop.
  4. Question: How do you write an infinite loop using the for statement?
Answer:
for ( ; ; ) {

}
  1. Question: How do you write an infinite loop using the while statement?
Answer:
while (true) {

}

Walang komento:

Mag-post ng isang Komento