Multiple choice technology programming languages

Between which two lines should you insert a break or a continue statement to print the message "Please close the door. I feel a draft. Thank you"? (Line numbers are included only for clarity's sake) 1. String door="open"; 2. boolean draft=false; 3. boolean shivers=false; 4. while (door=="open") { 5. draft=true; 6. System.out.println("Please close the door."); 7. if (draft) { 8. shivers=true; 9. System.out.println("I feel a draft."); 10. door="close"; 11. if (shivers) { 12. System.out.println("I'm shivering."); 13. } 14. } 15. } 16. if (door=="close") { 17. System.out.println("Thank you"); 18. shivers=false; 19. }

    1. Replace lines 7 to 14 with a break statement.
    1. Replace lines 7 to 14 with a continue statement.
    1. Replace line 12 with a continue statement.
    1. Insert a break statement between lines 16 and 17.
Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Replacing line 12 with continue prevents printing 'I'm shivering.' and keeps the loop running. The door closes at line 10, making the while condition false on the next iteration, so the loop exits naturally and the final message prints. This produces exactly the three required messages.