Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Design pattern

 
vishwas cheluva n
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the use of singleton design pattern??? and wat is the difference between singleton and factory???
 
Archana Nanjundarao
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Singleton helps in ensuring that only one instance of the class exists. Factory pattern is used to create objects of the class without exposing the instantiation logic.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic