Kinda confusing. In C++ any non-zero integer means true, and zero means false. I think I did read in one of my books about Java that in Java the zero does not mean false and any non-zero integer does not necessarily mean true. I thought the if statement always tests for truth. So if I did this in Java:
int x = 1;
if (x)
System.out.print("Welcome home.");
else
System.out.print("Go away.");
That would be wrong? I would have to say:
int x = 1;
if (x == 1)
System.out.print("Welcome home.");
else
System.out.print("Go away.");
I'm going to have to play around with this stuff.