Search:

Type: Posts; User: javapenguin

Search: Search took 0.11 seconds.

  1. Re: Singletons - I'm having a hard time understand how to implement them.

    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...
  2. Re: Singletons - I'm having a hard time understand how to implement them.

    Make the constructor private and do something like this:


    public class Singleton
    {

    private Singleton()
    {
Results 1 to 2 of 2