Calendar isn't a Singleton?! Then why does it have a getInstance() method?
What is the Runtime class for? It does indeed appear to be a Singleton.
Calendar's constructor is protected, so...
Type: Posts; User: javapenguin
Calendar isn't a Singleton?! Then why does it have a getInstance() method?
What is the Runtime class for? It does indeed appear to be a Singleton.
Calendar's constructor is protected, so...
Make the constructor private and do something like this:
public class Singleton
{
private Singleton()
{