hello Rahul, the code in demo class require
some correction.
x.Clone returns an Object.So it should be
explicitly casted in avoid compile time error.
as
class demo
{
public static void main(
String[] args)
{demo x=new demo();
try{
demo y=(demo) x.clone();
}
catch(Exception e){
System.out.println("Exception is " +e);
}
}
}
I think the reason for casting is correct.
If not correct me.
ThankQ