File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes differnt ways to create object for a class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "differnt ways to create object for a class" Watch "differnt ways to create object for a class" New topic
Author

differnt ways to create object for a class

anish reddy
Ranch Hand

Joined: Apr 19, 2008
Posts: 74
differnt ways to create an object.

i have done by using
1.new
2.ClassLoader
3.Class.forName

and i want to know other ways of creating new object in java



bye
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39396
    
  28
If you do a search you will find this has come up several times before and the answers given included
  • String literals
  • Array initialisers
  • Boxing Integers etc
  • Does use of a ClassLoader actually create objects independently from the other techniques?
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: differnt ways to create object for a class