adplus-dvertising
frame-decoration

Question

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

a.

one

b.

two

c.

onetwo

d.

twoone

Posted under Java Programming

Answer: (c).onetwo

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will s2 contain after following lines of code?