Q- Given the code fragment:
int x = 10;
int y = ++x;
int z = 0;
if (y >= 10 | y <= ++x) {
z = x;
} else {
z = x++;
}
System.out.println(z);
What is the result?
A) 12
B) A compile time error occurs.
C) 10
D) 11
⧪ please give your answer in a comment section.
int x = 10;
int y = ++x;
int z = 0;
if (y >= 10 | y <= ++x) {
z = x;
} else {
z = x++;
}
System.out.println(z);
What is the result?
A) 12
B) A compile time error occurs.
C) 10
D) 11
⧪ please give your answer in a comment section.
1 Comments
12
ReplyDelete