wood burning stoves*
The moose likes Java in General and the fly likes Use of Singleton pattern in JDK Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Use of Singleton pattern in JDK" Watch "Use of Singleton pattern in JDK" New topic
Author

Use of Singleton pattern in JDK

Anand Kapadi
Greenhorn

Joined: Jan 15, 2004
Posts: 26
Hi,
Can anybody provide an example of the use of Singleton pattern in any of the classes/constructs in JDK?
Thanks
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19543
    
  16

java.lang.Runtime
java.awt.Toolkit
java.awt.GraphicsEnvironment


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Girish K Gupta
Greenhorn

Joined: Mar 14, 2007
Posts: 19

Hi Rob

java.awt.Toolkit has a public constructor. It should not be a Singleton.

Thanks
Girish


Girish K Gupta
SCJP 1.5 - 87%, SCWCD 1.5 - 92%
India
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Use of Singleton pattern in JDK
 
Similar Threads
Singleton Pattern
Email and Design pattern
Thread safe code
Hibernate SessionFactory is initialized/read with every EJB call
Singleton pattern in j2ee?