Singleton pattern in Java | Design Patterns tutorial 01 | Java9s.com

Home/Programming Video Tutorials/Java Video Tutorials/Singleton pattern in Java | Design Patterns tutorial 01 | Java9s.com

Singleton pattern in Java | Design Patterns tutorial 01 | Java9s.com

FavoriteLoadingAdd to favorites

http://java9s.com
Singleton pattern which is one of the simple but important among the design patterns. In this design patterns tutorial series, i have explained the singleton pattern with a good example. I have also mentioned about the Example which can deal with the Thread related synchronization problems which was proposed by Bill Pugh.

Java468x60

Download the singleton pattern example from the link below:
https://github.com/java9s/observer-pattern-example

Complete Generics Tutorials playlist

Complete Java Beginners Tutorials:

Multithreading in Java tutorial:

Spring 3 MVC Framework tutorials:

Spring Framework Tutorials:
https://www.youtube.com/playlist?list=PL2882729612B70122

Design Patterns Tutorials:

By | 2017-06-18T02:28:48+00:00 June 18th, 2017|Java Video Tutorials|10 Comments

10 Comments

  1. Travis G June 18, 2017 at 2:54 am - Reply

    You get a like and a sub for this. Very good explanation, Sir.

  2. snitin1487 June 18, 2017 at 3:01 am - Reply

    Hello Sir, Please also mention ways to break the Singleton Pattern with some practical examples.

  3. manas rout June 18, 2017 at 3:01 am - Reply

    Thank you so much for nice and easy way to explaing.

  4. Konstantinos Saittis June 18, 2017 at 3:04 am - Reply

    We do we need the helper class? Can’t we just have an member variable in Satelite class like `private static final Satelite _instance = new Satelite();`

  5. Tamanna Lekhwani June 18, 2017 at 3:05 am - Reply

    The flight tracking example you gave is understandable. But can you let me know why do we need to make the Satellite class singleton if we can make all its data static? Can you give an example where using singleton is the only option?

  6. Venkat Ramana June 18, 2017 at 3:17 am - Reply

    Could you please upload videos about Design principles like Open-Close, Dependency inversion…. etc ?

  7. Nasiru Tanko June 18, 2017 at 3:17 am - Reply

    Thanks

  8. phani sekhar June 18, 2017 at 3:24 am - Reply

    good work sir….

  9. John Madsen June 18, 2017 at 3:25 am - Reply

    Question. The last change seems to be creating a new instance for each call. The loop in main would create more than one instance? Static or not, you are newing up for each iteration of the loop. Correct?

  10. Wayne Johnson June 18, 2017 at 3:28 am - Reply

    Thanks very helpful

Leave A Comment

*