Confused
I was reading a book on Java and got really confused...see when we create
Class abc a,b;
a=new abc();
b=a;
both b and a point to the same object and there are no copies created....
Please tell me where am I goin wrong in the following arguement
class emp
{
public emp(String s)
{
name=s;
}
public getname()
{return name;}
}
when I call emp e = new emp("ABC") the String s of the constructor now points to the string "ABC" which is assigned to name. Since the constructor ends s gets destroyed. So how come getname is able to return ABC.

