Sail E0 Webinar
Question

What will s2 contain after following lines of code?

 StringBuffer s1 = "one;

 StringBuffer s2 = s1.append("two)

Options:
A .  one
B .  two
C .  onetwo
D .  twoone
Answer: Option C


Two strings can be concatenated by using append() method.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers