What are the other ways to create an object with out calling
new keyword in java?

Answers were Sorted based on User's Feedback



What are the other ways to create an object with out calling new keyword in java?..

Answer / bala

using in class.for name method
myobject obj=(my object)class.for name("sub in.rnd.my object").new instance();

Is This Answer Correct ?    1 Yes 0 No

What are the other ways to create an object with out calling new keyword in java?..

Answer / sumitpalsingh

1.by using newInstance();,but before this we have to load the class by using Class.forName();

myobject obj=(my object)class.for name("sub in.rnd.my object").new instance();

2.By using clone();
3.BY using DeSerialization.
ObjectInputStream inStream = new ObjectInputStream(anInputStream );
MyObject object = (MyObject) inStream.readObject();

4.By using String class .

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Programming Languages AllOther Interview Questions

WAP to print all prime nos between 1 to 100 without using user input...pls reply within few hours...

1 Answers  


which book we learned this mantis? how many version are realsed this mantis upto now?

0 Answers  


What is meant by SQL,PL/SQL,SQL PLUS? Is there any differnece between them?

2 Answers   HSBC,


how many logical drive we can form to physical device in our computer?

1 Answers   nvidia,


what is difference between VB5 AND VB6.0

2 Answers   Satyam,


Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fit" instead of the number and for the multiples of five print "Bit". For numbers which are multiples of both three and five print "FitBit".

0 Answers  


What is a dialog based program

1 Answers  


Expand the following a) ISDN b) CASE c) CSMA/CD d) OOPS e) MIMD

4 Answers   CTS,


what is inprocess and outprocess in vb

1 Answers   Msoft,


cobol is execution r not without jcl

0 Answers   IBM,


what is encapulation?

4 Answers   Syntel,


hi This is radhika.Can anyone help me to know the question papers of NATIONAL INFORMATICS CENTRE for the post of scientific officer/engineer? if anyone know plz tell me question paper pattern

0 Answers  


Categories