Java Questions & Answers – Control Statements SET-1

Q.1 Which of the following is a selection statement in Java?



  • if()


  • for()


  • break


  • None of these

Q.2 Which of the following is an iterative statement in Java?



  • if()


  • for()


  • break


  • None of these

Q.3 Which of the following is an entry-controlled loop?



  • while()


  • do while()


  • break()


  • None of these

Q.4 Which of the following is an exit-controlled loop?



  • while()


  • do while()


  • break()


  • None of these

Q.5 What is the correct syntax of a While loop?



  • initialization; while (condition) { body; increment/decrement; }


  • increment/decrement; initialization; while (condition) { body; }


  • (initialization value ;condition;increment/decrement)


  • None of these

Q.6 True or False: The switch statement does not require a break statement.



  • True


  • False


  • None of these


  • N/A

Q.7 True or False: The while loop repeats a set of code while the condition is false.



  • True


  • False


  • None of these


  • N/A

Q.8 True or False: The do-while loop repeats a set of code at least once before the condition is tested.



  • True


  • False


  • None of these


  • N/A

Q.9 True or False: The for loop repeats a set of statements a certain number of times until a condition is matched.



  • True


  • False


  • None of these


  • N/A

Q.10 Which of the following will execute the body even when the condition controlling the loop is initially false?



  • switch


  • if


  • for


  • None of these

Scroll to Top