πŸ“Š JAVA
Q. What will be the output?
Code:
String s = "abc";
s.toUpperCase();
System.out.println(s);
  • (A) ABC
  • (B) abc
  • (C) Compilation Error
  • (D) Runtime Error
πŸ’¬ Discuss
βœ… Correct Answer: (B) abc

Explanation: String is immutable, so original value remains unchanged.

Explanation by: Roshan
String is immutable, so original value remains unchanged.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
10
Total Visits
πŸ“½οΈ
2 mo ago
Published
πŸŽ–οΈ
Roshan
Publisher
πŸ“ˆ
85%
Success Rate