What is the output of the following Java code? int num = 15; while (num > 0) num = num - 3; System.out.println(num) ;
A) 0
B) 3
C) 12
D) 15
Correct Answer:
Verified
Q24: Which of the following is NOT a
Q25: What is value of x after the
Q26: After a break statement executes, the program
Q27: Because a do...while loop is a post-test
Q28: Which of the following is true about
Q30: Suppose sum and num are int variables,
Q31: Which of the following is the update
Q32: What is the value of counter after
Q33: If a continue statement is placed in
Q34: The do...while loop has an exit condition
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents