• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Use of Singleton pattern in JDK

 
Anand Kapadi
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can anybody provide an example of the use of Singleton pattern in any of the classes/constructs in JDK?
Thanks
 
Rob Spoor
Sheriff
Pie
Posts: 20512
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.lang.Runtime
java.awt.Toolkit
java.awt.GraphicsEnvironment
 
Girish K Gupta
Greenhorn
Posts: 19
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rob

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

Thanks
Girish
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic