I have a method with a break statement in its if statement. The method is in a while loop. Will it break out of the while loop if I use break within the method's if statement or do I have to use nested loops?
public int x=0;public int y=0;
public boolean endCondition = true;
public void someMethod()
{
if(x!=y) {//do something}
else break;
}
while(endCondition==true)
{
this.someMethod();
}
System.out.println("Bloke");