Saturday, 9 March 2013

MCQ #2

Question) Using a break in a for loop causes the loop to break out of the current execution and jump to next iteration.

  • True
  • False
Answer) Flase

Explanation) I would recommend go through the post on Transfer Statements in Java Tutorials section.break keyword will cause loop to break out of current execution permanently and continue with the code after the loop.Note that break statement is used only in loops and switch statement.So answer is False.

No comments:

Post a Comment

t> UA-39527780-1 back to top