object reference
Hi,
I got "[100, 200] []" for the following program. Can anyone explain me why s2 is not printing [100,200]?
public static void main(String[] args)
{
Stack s1 = new Stack ();
Stack s2 = new Stack ();
S1 e1 = new S1 ();
e1.convert (s1,s2);
System.out.println (s1 + " "+ s2);
}
public void convert(Stack s1, Stack s2)
{
s1.push (new Integer ("100"));
s2= s1;
s2.push(new Integer("200")) ;
}

