Get your CodeRanch badge!*
The moose likes Ranch Office and the fly likes java-Factory Method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » This Site » Ranch Office
Bookmark "java-Factory Method" Watch "java-Factory Method" New topic
Author

java-Factory Method

uma1975
Greenhorn

Joined: Jan 18, 2002
Posts: 1
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:-)
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
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...


"I'm not back." - Bill Harding, Twister
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java-Factory Method
 
Similar Threads
Locks without Client IDs?
factory question
Difference between builder and abstract factory
Home Interface.. Abstract Factory or Factory Method pattern?
Builder vs Abstract Factory