*
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
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: 36508
    
  16
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?
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
     
    subject: differnt ways to create object for a class
     
    Similar Threads
    Killing The Session ???
    object creation
    Ways to create an object?
    object
    Two ways to create a class