Q. What is the output of the following code snippet?

Code:
String s1 = “Hello”;
System.out.println(sA)toLowerCase());
  • (A) hello
  • (B) Hello
  • (C) HELLO
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (A) hello
Explanation: The toLowerCase method in Java converts a string to lowercase. In this case, sA)toLowerCase() returns “hello”.
Explanation by: Mayank
The toLowerCase method in Java converts a string to lowercase. In this case, sA)toLowerCase() returns “hello”.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
248
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mayank
Publisher
πŸ“ˆ
80%
Success Rate