Q. What will be the output?
Code:String s = "Java";
s.concat(" World");
System.out.println(s);
β
Correct Answer: (A)
Java
Explanation: Strings are immutable. concat() returns a new string but does not modify the original.