MCQs > IT & Programming > Java > public class SomeClass { public static void main(String[] args) { System.out.println(((String)null).toUpperCase()); } } What is the result of the following program?

Java MCQs

public class SomeClass { public static void main(String[] args) { System.out.println(((String)null).toUpperCase()); } } What is the result of the following program?

Answer

Correct Answer: The code throws NullPointerException.

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it