Q. What will be the output?
Code:
String s = "abc"; s.toUpperCase(); System.out.println(s);
β
Correct Answer: (B)
abc
Explanation: String is immutable, so original value remains unchanged.