Can anyone please let me know is there any predefined Sigleton class being used in core java API.
I am not looking into servlets,jsps etc... only in core API. This is one of my interview question.
There are plenty: java.lang.Runtime() is one; java.awt.Toolkit is another. There are many more. Just look for public classes with no public constructors and a parameterless method that returns an instance of that class -- usually that'll be one.