Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

[JAVA] creating instance of the class  

temp temp

2007-02-09

Replies:

  I want to create instance of a class using object.getClass().new Instance()  but this object constructor needs another object so how can I do this ?
   
   
   Suppose I have a class
   
   DefaultMetaInfoHandler  default=new DefaultMetaInfo(?test?);
   
   Can I create instance of this class using default.getClass().newInstance()

If I have to create how ?

Thanks
Miro

 

---------------------------------
Check out the all-new Yahoo! Mail beta - Fire up a more powerful email and get things done faster.
©2008 junlu.com - Jax Systems, LLC, U.S.A.