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

what is radio button? Plz show code this! how will select radio buttons to go next window Forms? Supose o radio button1 o radio button2 o radio button3 o radio button4 how will coding this? Plz explain this!

0 Answers  


what is software

2 Answers  


where is available in this mantis toturials?

0 Answers  


what is static objects in java

2 Answers  


qtp 9.2 14 days demo version was expired.I uninstalled how to reinstall this again

0 Answers  


What is the difference between DECISION COVERAGE(DC) and MODIFIED CONDITION/DECISION COVERAGE(MCDC)?

0 Answers  


what is mutex?

4 Answers   Axiom, Blue Star, SQL Star,


3. What is the difference between testing and Quality Assurance?

0 Answers  


Do not use more than 3 nested IF. Use Evaluate statement in case of more IF required. Please give a detail explantion besides readability and clarity for Evaluate stmt.

0 Answers  


shall we execute our java programmes in jre

0 Answers  


Write a program to implement BFS/ DFS routine in a connected graph

1 Answers  


How to connect the .accdb database file of microsoft access to the Visual Basic 6.0 forms?

0 Answers  


Categories