Java Questions & Answers – Control Statements SET-1

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

  • A) if()
  • B) for()
  • C) break
  • D) None of these

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

  • A) if()
  • B) for()
  • C) break
  • D) None of these

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

  • A) while()
  • B) do while()
  • C) break()
  • D) None of these

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

  • A) while()
  • B) do while()
  • C) break()
  • D) None of these

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

  • A) initialization; while (condition) { body; increment/decrement; }
  • B) increment/decrement; initialization; while (condition) { body; }
  • C) (initialization value ;condition;increment/decrement)
  • D) None of these

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

  • A) True
  • B) False
  • C) None of these
  • D) N/A

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

  • A) True
  • B) False
  • C) None of these
  • D) N/A

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

  • A) True
  • B) False
  • C) None of these
  • D) 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.

  • A) True
  • B) False
  • C) None of these
  • D) N/A

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

  • A) switch
  • B) if
  • C) for
  • D) None of these

Scroll to Top