Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will s2 contain after following lines of Java code?
String s1 = “one”;
String s2 = s1.concat(“two”)

What will s2 contain after following lines of Java code?
String s1 = “one”;
String s2 = s1.concat(“two”)
a) one
b) two
c) onetwo
d) twoone

Answer: c
Explanation: Two strings can be concatenated by using concat() method.

Join The Discussion