This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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 Building Microservices this week in the Design 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: 44031
    
  33
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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
     
    subject: differnt ways to create object for a class
     
    It's not a secret anymore!