Flow Control(Java Program ) Questions and Answers
Explanation:-
Answer: Option A. -> NumberSeven NotSevenExplanation:-
Answer: Option A. -> 0 6 1 7 2 8 3 8Explanation:-
Answer: Option A. -> 10In giving a program for loop will be break when i=10. Since after for only one statement execute ( j += i;) because brace is not mentioned and after that print statement will execute and print i=10
Explanation:-
Answer: Option C. -> aExplanation:-
Answer: Option B. -> 2Initially 'x' = 3 and y =4 when switch statement execute switch(x + 3) case 6 will be executed and initialize y = 0 and after that case 7 will be executed (because there is no break statement so it will execute all the case) and initialize y = 1 and after that default case execute which add 1 in y and y become 2.