Yes, you've got it, except Java does not interpret 01000000 as being true. You need an explicit comparison when testing any value that is not boolean. Otherwise, you get a compiler error:
int flag = 0;
if(flag != 0)
System.println("flag is nonzero");
if(flag) // error
System.println("flag is nonzero"); The second if() is a problem because it evaluates to this:
if(flag == true) // error
System.println("flag is nonzero"); This is comparing an int and a boolean, so you have a type mismatch, and the compiler will choke. But on the boolean operations stuff, it seems you're clear.