1)what are the other ways to create an object otherthan creating as new object?

Showing Answers 1 - 4 of 4 Answers

jayant

  • Sep 28th, 2005
 

create new object otherthan using new operator in java

ObjectType obj = className.getMethod();

above coding  obj is object return by method getMethod.

  Was this answer useful?  Yes

Phanindra Varma

  • Oct 11th, 2005
 

Classname obj = Class.forName("Fully Qualified class Name").newInstance();

  Was this answer useful?  Yes

anshuman chhotaray

  • Nov 2nd, 2005
 

to create object without using new keyword isclassname obj=(cast class)Class.forName("class name").newInstance();Anshuamn/ orissa / ndia

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions