I found this code in a book and I executed it in Netbeans:
boolean b = false;
if(b = true) {
System.out.println("true");
} else {
System.out.println("false");
}
I just don't understand why the output of this code is true, Can anyone enlighten me please, Thanks.
See Question&Answers more detail:os