Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

differnt ways to create object for a class

 
anish reddy
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 50246
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic