+ 1
Output of following question and why?
int a=5 , b=10; int(a>5) if(b>5) { System.out.println(b); } else System.out.println(a);
3 Answers
+ 1
I got it. Thanks.
0
But in Java if condition block starts with " { "
so how can one be certain that the 1st if block contains other code.
0
compare with this
int a=5 , b=10;
if (a>5) {
if(b>5) { //nested if block
System.out.println(b);
}
} else
System.out.println(a); // output 5