Q. What is the output of the following code snippet?
Code:String s1 = “Hello”; String s2 = “World”; System.out.println(sA)concat(s2));
β
Correct Answer: (A)
HelloWorld
Explanation: The concat method in Java concatenates two strings together. In this case, sA)concat(s2)