• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

java-Factory Method

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to create a class with private constructor and a factory method to create the instance. How many ever times I create the Instance , I should get the same instance ie., At any point of time there should be only one instance.
can u help on this?
Uma:-)
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, welcome to JavaRanch. To get useful info from this site there are a few things you need to do:
(a) Register with a display name which meets the rules given during the login process.
(b) Post this question in one of our other forums which discusses the Java language. (This part of the site is where we discuss the web site, not the language.)
(c) Or, just search for the word "singleton" using our search facility to find numerous past discussions of this.
Enjoy...
 
expectation is the root of all heartache - shakespeare. tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!