The reason why the code works is because of Autoboxing feature of
java 5.0.
new Boolean("TRuE") - creates a new Boolean object and when used with if condition, autoboxing takes place and the object is automatically converted to a primitive boolean value, which in this case is true and hence the following printf statement is executed.
Ranchers correct me if i am wrong.