M
Mike Schilling
Harold said:Nope. Or, at least, not what was implied elsewhere.
Well, there's the problem, right there. Most other places, having a
no-arguments "getInstance" method instead of a constructor means
some
sort of singleton. (Although I can see why this wouldn't work for
Calendar, which is mutable; it wouldn't be thread-safe.)
Or useful even within one thread:
Calendar cal = Calendar.getInstance();
cal.setTime(.....)
Calendar cal2 = Calendar.getInstance();
cal2.setTime(....) // D'oh!
newInstance() would be a better name.