name of the design pattern
Hi
I have been studying a piece of code somebody else wrote. I am wondering if this is the Factory Method design pattern that this represents. I am new to patterns and I would be very thankful for any suggestions.
publicclass Creator{
public Person create(String gender){
if (gender.equals(揗?
returnnew Male();
elseif (gender.equals(揊?
returnnew Female();
else
returnnull;
}
}
-
thanks in advance

