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.printl
if(b = true)
Well it is true because = is the assignment operator and not the equality operator ==