Q. What is the output of the following code?

Code:
String s1 = “Hello”;
String s2 = “World”;
String s3 = s1 + s2;
System.out.println(s3);
  • (A) HelloWorld
  • (B) Hello World
  • (C) HelloWorld
  • (D) Hello_World
πŸ’¬ Discuss
βœ… Correct Answer: (A) HelloWorld
Explanation: The values of s1 and s2 are concatenated to form s3, which is then printed.
Explanation by: Deepak Sahoo
The values of s1 and s2 are concatenated to form s3, which is then printed.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
207
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Deepak Sahoo
Publisher
πŸ“ˆ
92%
Success Rate