I am confused with output of following code :
public class Bufer{
public static void main(String args[]){
Bufer obj =new Bufer();
StringBuffer b = new StringBuffer("abc");
obj.method(b);
System.out.println(b);
}
void method(StringBuffer b){
b.append("qwe");
b=null;
}
}
Output : abcqwe
Please explain the output and why there is no nullpointer exception ?