Page 1 of 1

About Question enthuware.ocpjp.v7.2.1096 :

Posted: Thu Mar 06, 2014 11:20 am
by erbegu
As "getStudentDAO()" is static, isn't this also Singleton pattern? Just to clarify, thanks.

Re: About Question enthuware.ocpjp.v7.2.1096 :

Posted: Thu Mar 06, 2014 11:30 am
by admin
No, this is not a singleton pattern. You may read about Singleton pattern here: https://blogs.oracle.com/JavaFundamenta ... loops_with

Re: About Question enthuware.ocpjp.v7.2.1096 :

Posted: Sat Aug 30, 2014 1:00 pm
by hamada.yamasaki
Isn't it mandatory that factory pattern must take some type param in order to constuct an object?
for. e.g.
public class DAOManager{          
public static StudentDAO getStudentDAO(String type){         return new StudentDAOJpaImpl();     }      }

Re: About Question enthuware.ocpjp.v7.2.1096 :

Posted: Sat Aug 30, 2014 7:35 pm
by admin
No, it is not mandatory for a factory pattern to take some parameter.