This is related to creating and destroying objects from the book 'Effective Java' by Joshua Bloch
Item 1: Consider static factory methods instead of constructors
This method translates a boolean primitive value into a Boolean object reference:
public static Boolean valueOf(boolean b) {
return b ? Boolean.TRUE : Boolean.FALSE;
}
Note that a static factory method is not the same as the Factory Method pattern from Design Patterns [Gamma95, p. 107]. The static factory method described in this item has no direct equivalent in Design Patterns.
The author seems to be talking about the the difference between Static Factory Method and Factory Method Pattern. What exactly is the difference here?
Asa further matter, BalusC mentions in this thread, a link under Factory Method, java.util.Calendar#getInstance() which is a static factory method suggesting thereby that the static factory method is a subset of Factory Method Pattern.