About Question enthuware.ocajp.i.v7.2.1194 :
Posted: Sun Sep 23, 2012 2:38 am
In solution description , you mentoned
C:\works\nbtestproject\src\TestClass.java:46: reference to println is ambiguous, both method println(char[]) in java.io.PrintStream and method println(java.lang.String) in java.io.PrintStream match System.out.println(null + true); //1
Shouldn't there be System.out.println(null); to back up this statement, because System.out.println(null/true + true/null);always give compilation msg : "Operator + cannot be applied to null/boolean or boolean/null"
C:\works\nbtestproject\src\TestClass.java:46: reference to println is ambiguous, both method println(char[]) in java.io.PrintStream and method println(java.lang.String) in java.io.PrintStream match System.out.println(null + true); //1
Shouldn't there be System.out.println(null); to back up this statement, because System.out.println(null/true + true/null);always give compilation msg : "Operator + cannot be applied to null/boolean or boolean/null"