What is the result of the following code execution?

Boolean b = new Boolean("Hello");
System.out.println(b);
Explanation
The constructor creates an object with a value of true, only if the given string matches, insensitive, with the '"true". In all other cases, the object is created with a value of false.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Java quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes