Hi all, What exactly is the advantage of using Factory pattern ? When this pattern is useful ? Any useful tutorial(with examples) for Factory pattern ? Thanks in advance.
Ramdas.
If you think you can, you can. If you think you can't, you are right.
we are using factory pattern , when we want to genearalize the concept, we can generalize by making an interfce. i mean to say , making a core interface .called factory and than extend it according to requirments does it make some sense
Hi, The factory pattern is a creational pattern. Think the follwing scenario to used factory pattern
1. When the class doesn't know which class of object to be create. 2. A class specifies its subclasses to specify which class object to be create. 3. Based the value the subclass decide to create the specified object.
Raghu J<br />SCJP 1.4<br /> <br />The Wind and waters are always<br />on the side of the ablest navigators.<br /><a href="http://groups.yahoo.com/group/scjp_share" target="_blank" rel="nofollow">SCJP Group</a><br /><a href="http://groups.yahoo.com/group/JavaBeat_SCWCD" target="_blank" rel="nofollow">SCWCD Group</a>
I got this tall by not having enough crisco in my diet as a kid. This ad looks like it had plenty of shortening:
Gift giving made easy with the permaculture playing cards