Q.- Given the code fragment:-
if (aVar++ < 10) {
System.out.println(aVar + " Hello Universe!");
}
else {
System.out.println(aVar + " Hello world!");
}
What is the result if the integer aVar is 9?
A) 9 Hello world!
B) Compilation fails.
C) 10 Hello world!
D) 10 Hello Universe!
⧪ please give your answer in a comment section.
if (aVar++ < 10) {
System.out.println(aVar + " Hello Universe!");
}
else {
System.out.println(aVar + " Hello world!");
}
What is the result if the integer aVar is 9?
A) 9 Hello world!
B) Compilation fails.
C) 10 Hello world!
D) 10 Hello Universe!
⧪ please give your answer in a comment section.
6 Comments
Option C
ReplyDeleteC
ReplyDeleteD
ReplyDeleteD
ReplyDeleteD
ReplyDeleteC
ReplyDelete