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

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

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

FavoriteLoadingAdd to favorites

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:

Complete Generics Tutorials playlist

Complete Java Beginners Tutorials:

Multithreading in Java tutorial:

Spring 3 MVC Framework tutorials:

Spring Framework Tutorials:

Design Patterns Tutorials:

source

By |2021-03-12T12:52:23+00:00March 12th, 2021|Java Video Tutorials|14 Comments

14 Comments

  1. Teja Ch March 12, 2021 at 12:52 pm - Reply

    Ecellent Explanation….

  2. Abdulbari Shaikh March 12, 2021 at 12:52 pm - Reply

    Thank you. Very well explained. Like the last part about solving multithreading related issues. Subscribed

  3. William Hou March 12, 2021 at 12:52 pm - Reply

    Very good. Simple and clear. I've watched other videos, but yours is the best.

  4. Neeraja Gandla March 12, 2021 at 12:52 pm - Reply

    How does creating the instance in an inner class solve the problem during multithreading?

  5. Phani Sekhar Vasana March 12, 2021 at 12:52 pm - Reply

    good work sir….

  6. ksaittis March 12, 2021 at 12:52 pm - 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();`

  7. Travis G March 12, 2021 at 12:52 pm - Reply

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

  8. manas rout March 12, 2021 at 12:52 pm - Reply

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

  9. John Madsen March 12, 2021 at 12:52 pm - 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. Venkat Ramana March 12, 2021 at 12:52 pm - Reply

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

  11. Tamanna Lekhwani March 12, 2021 at 12:52 pm - 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?

  12. Nasiru Tanko March 12, 2021 at 12:52 pm - Reply

    Thanks

  13. snitin1487 March 12, 2021 at 12:52 pm - Reply

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

  14. Wayne Johnson March 12, 2021 at 12:52 pm - Reply

    Thanks very helpful

Leave A Comment

*