What is the output for y? int y = 0. for (int i - 0; 1< 10; 1){y = 1;} Syzran ou
ID: 3798925 • Letter: W
Question
What is the output for y? int y = 0. for (int i - 0; 1< 10; 1){y = 1;} Syzran out print ln(y). 10 11 12 13 Will the following proem terminate? int balance = 10; while (true) {if (balance <, 9) break; balance - balance - 9;} Yes No A return statement without any value can be used in a nan-void method void method Does the return statement in the following method cause compile errors? public static void main(String [] args) {int max = 0. if (max 1 = 0) System out prints (max), else return;} Yes NoExplanation / Answer
Question 37:
Answer: E. 45
Question 38:
Answer: A. Yes
Code will temrinate. In first iteration if block will not execute. balance = balance - 9 will execute. So balance value is 1 now. if block will execute and terminate the loop.
Question 39:
Answer: B. void method
Question 40:
Answer: No. It will cause compilation errors since main method is a void method.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.