BOOLEAN CONDITION
I can not understand the behaviour of the code. I first set variable S1 to false. Then I put a boolean condition, which equates to false=true, and still the while loop is executed and I get an output false and Green. I think while loop should not have been executed
Can anyone kindly guide me where I am wrong.
public class Test{
public static void main(
String IBM[]){
String P="GREENHORN";
boolean S1;
int q=0;
int w=0;
S1=q<w;>
System.out.println(S1);
while (S1=true){ System.out.println(P.substring(0,5));
break;
}}
}