+ 1

If query

will the following code be evaluated? if(27) System.out.println("Condition true");

16th Jan 2017, 4:31 PM
Jotheeswaran M
Jotheeswaran M - avatar
2 Respostas
+ 2
yes the code will be evaluated to true! any positive integer will be taken as true and the if condition evaluates to true!
16th Jan 2017, 4:34 PM
Jotheeswaran M
Jotheeswaran M - avatar
+ 1
anything non zero = true zero = false therefore, this is true
16th Jan 2017, 4:33 PM
Nikunj Arora
Nikunj Arora - avatar