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


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement