abstract class with static method that returns instance of itself?
807598Nov 2 2006 — edited Nov 2 2006Hi,
I was looking at the Calendar class, and it is defined as a public abstract class. It has a static method called getInstance() which returns a Calendar object. How does an abstract class instantiate an object of itself? I tried to code an example doing that, but I get the error message:
MyClass is abstract; cannot be instantiated.
Can anyone provide a brief code example of how that works?