hi
when i compile this code I got compile error.
Here at ////1
Do let me know why ???
public class haiii
{
public static void main (
String[] args)
{
boolean b1 = false;
boolean b2 = false;
if (b2 != b1 = b2) ////1
{
System.out.println("true");
}
else
{
System.out.println("false");
}
}
}
If I change the above code at ////1 to below as it compiles fine
i dont understand why ...
public class haiii
{
public static void main (String[] args)
{
boolean b1 = false;
boolean b2 = false;
if (b2 = b1 = b2) ////1
{
System.out.println("true");
}
else
{
System.out.println("false");
}
}
}