What will be the output of the following code?
StringBuffer sb1 = new StringBuffer("Java"); StringBuffer sb2 = sb1; sb1.append(" Programming"); System.out.println(sb2);
Java
Java Programming
Compilation Error
Runtime Exception
This question is part of this quiz :
Java String Classes