--:--









Quiz for Control Flow

Course: JAVA | Subject: Java | Topic: Core Java



Logo

Q1: Which keyword is used to make a decision in Java?

Logo

Q2: Which loop always executes at least once?

Logo

Q3: Which statement skips the current iteration in a loop?

Logo

Q4: What is the purpose of the break statement in Java?

Logo

Q5: What keyword is used to exit from a loop prematurely?

Logo

Q6: Which statement is used for multiple selection?

Logo

Q7: Which keyword defines a block in switch for comparison?

Logo

Q8: What will happen if break is omitted in switch-case?

Logo

Q9: What is an enhanced for loop used for?

Logo

Q10: Which loop is evaluated before executing the loop body?

Logo

Q11: Which statement is used to return from a method?

Logo

Q12: Which keyword is used to repeat a block of code while a condition is true?

Logo

Q13: What type of control structure is 'if-else'?

Logo

Q14: Which keyword is used to stop a loop and transfer control outside?

Logo

Q15: What does 'continue' do in a loop?

Logo

Q16: Which control structure handles multiple paths based on a value?

Logo

Q17: What is the minimum number of times a do-while loop runs?

Logo

Q18: How many times does a 'for' loop run if the condition is false initially?

Logo

Q19: Can you use 'break' inside nested loops?

Logo

Q20: Which statement controls decision-making in Java?

Logo

Q21: Which control flow keyword must be used with 'switch' to prevent fall-through?

Logo

Q22: How many else blocks can you use with one if?

Logo

Q23: What happens if you forget to use 'break' in a switch block?

Logo

Q24: Which loop is best suited for iterating arrays?

Are you ready to start test? Set your time limit