Category: interviewexperience


1.First Interview: 10-10-2009   1)How many ways  are there to create an object? i) Using ‘new’ operator: Test s=new Test(); ii) Factory method: Thread t=Thread.currentThread(); iii)  newInstance(): Class c=Class.forName(“Test”); Object obj=c.newInstance();           àcreates Test class Object. Test t=(Test)obj; iv) clone(): Test Read more…