Friday, July 2, 2010

Java Tips

if (2 + 2 == 3)

; // empty statement

else

System.out.println("2 + 2 is not equal to 3");

ans: 2 + 2 is not equal to 3
---------------------------

if (!(2 + 2 == 3))

System.out.println("2 + 2 is not equal to 3");


ans:2 + 2 is not equal to 3

No comments:

Post a Comment