class Test
{
public static void main(String [] args)
{
StringBuffer a = new StringBuffer("M");
StringBuffer b = new StringBuffer("N");
mergeData(a, b);
System.out.println(a+","+b);
}
static void mergeData(StringBuffer x,StringBuffer y)
{
x.append(y);
y = x;
}
}
What would be the output?
Options
- M,N
- M,M
- N,N
- MN,N
CORRECT ANSWER : MN,N
Write your comments