In explanation of 3rd option is written:
But in the last sentence of explanation is written:This will not compile because Boolean class does not have a no-args constructor.
Thus, new Boolean() == new Boolean() is false, but new Boolean() == Boolean.parseBoolean("true") is true.
Code: Select all
System.out.println(new Boolean() == new Boolean()); // DOES NOT COMPILE
System.out.println(new Boolean() == Boolean.parseBoolean("true")); // DOES NOT COMPILE
P.S. I bought full enthuware exam two days ago, but I decided to begin from sample test for adaptation to program structure. Explanations are very good. I hope that the explanations of standard tests would be helpful too

Kind regards,
Mushfiq