>if(amethod())
the return type of amethod() other than boolean must result in compiler error... think so.
sample code like this:
boolean compare(int a, int b){
if(a >= b)
return true;
else
return false;
}
// then it will compile like this
if(compare(3, 2))
System.out.println("a >= b");
else
System.out.println("a < b");
actually, there are lot of methods return boolean value in java API, check them out...
rong chen
[This message has been edited by Rong Chen (edited October 06, 2000).]
[This message has been edited by Rong Chen (edited October 06, 2000).]