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