amr talaat wrote:
I WANT TO DO THIS
WHILE (!method1(N1,N2)||!method2(N1,N2))
{
//EXCUTE THIS UNTIL ONE OF THE METHODS RETURN FALSE
}
The above says, "keep looping as long as m1() and m2() both return true." That's what "while" means in English and in Java. You seem to have been treating "while" as if it meant "until."
Note that when using &&, if m1() returns false, it won't bother evaluating m2(), wince it can't affect the outcome of the if condition. If you want m2() to execute even if m1() returns false, use & instead of &&.