View Single Post
  #2 (permalink)  
Old 07-10-2007, 06:01 PM
mary mary is offline
Member
 
Join Date: Jul 2007
Posts: 51
mary is on a distinguished road
Because you are printing the result of comparing i with j, and the result will be boolean
If you want that it prints 1 or 0 you have to write it
Code:
int i=0; int j=10; If(i==j){System.out.println(1);}else {System.out.println(0);}
Reply With Quote