Комментарии:
Thanks
ОтветитьI awe you respect Sir,Can't thank you enough.🙏🏻
I never understood why do we use a private constructor in a singleton class ,when jvm has automatically a default public constructor defined.
Got the answer,: To make it private and not allow clients to make objs with default constructor which is public by default,i.e to simple restrict the user from creating instance of the class .
Greatful to you.🙏🏻🫡🙏🏻❣️💯
Thanks for explaining this topic so simply.
ОтветитьAnd, if the singleton needs to call a web service to fetch some values, where do you place the code? Do you place it inside the singleton class or outside?
Ответитьlot of videos in java. why not in python?
ОтветитьWe can also remove the getInstace method and can directly call the object by writing (Abc obj1 = Abc.obj) in main method
ОтветитьAmazing 🙏🙏🙏
ОтветитьConcise as always!
Ответитьyou are amazing sir.
Ответитьthx!
ОтветитьBro y cant we use static class abc
Insted of declaring an static abc object
That;s the reason i love navin reddy tutorials he will just make viewers master in the concept what he is teaching Great man u are really great ALIEN..
ОтветитьThanks, I wish I came straight to this post before searching around; you made this concept very easy to understand.
ОтветитьVery nice explanation sir. Keep making this type of valuable video always.
Thanks a lot
Great video. Short and to the point. Good explanations.
Ответитьexcellent tutorial, thank you so much, easy to understand!
Ответитьnice and clear explanation
ОтветитьEither i am stupid or something is wrong here ! how on earth he is able to create a method (getInstance) without mentioning the return type ? I mean i am not able to do that my IDE shows error
ОтветитьSimple and Amazing explanation!
ОтветитьGreat explanation
ОтветитьThank you. Guys please like and share his videos. He really works hard. Thank you sir thank you so much.
ОтветитьThank you a lot 💫
ОтветитьHey! Is possible to pass arguments in singleton
ОтветитьThanks. This is amazing explanation. Easy to understand!
ОтветитьSingleton grindset
ОтветитьJust adding some information here because I was facing the issue. We can create as many as instances inside the class because in the class we can access private constructor but we can't access it from outside the class.
Ответитьis this singleton tutorial or simpleton trying speak English
ОтветитьToday I was asked this question in Java Back End Developer interview for Qualitest.
ОтветитьBest explanation of this. Saved me a whole lot of trouble and inefficient alternatives
ОтветитьWhy there is not setter but getter in singleton class
Ответитьthis is the most simple explanation of a singleton design pattern i ever came across, thanks a lot
Ответитьgreat video
ОтветитьBest explanation have ever found... thank you:)
Ответитьi have a doubt, every time calling the getInstance() there is new instance of Abc class will create, so then how this approach follows singleton design pattern?
ОтветитьNice Explanation of Singleton :)
ОтветитьThanks Naveen! for making java interesting
ОтветитьThankyou for thIs beautiful explanation.. could you also includes the implementation of such concepts in a project
ОтветитьI agree with some of the comments here. The explanation is really good but an example would have helped a lot.
One example for Singleton use is simply Database connections. You don't want more than one instance throughout the application.
Thank you
ОтветитьI have a question. We could have called the static variable in the other class main method, would have acted the same way as it is a static variable itself. Why we need a static method and call the static variable through the method?
Ответитьbest explanation about Singleton Class
ОтветитьAwesome explaination of single ton pattern
ОтветитьThanks, sir. This really helps to get a proper understanding of the basics!
ОтветитьThanks man! I have to make one of these for a project I'm working on. This is exactly what I needed to see.
ОтветитьDo we need the private constructor? Will it work without it?
Ответить🇿🇦🇿🇦🇿🇦🇿🇦🇿🇦🇿🇦🇿🇦🇿🇦🇿🇦🇿🇦, which country is this from the flag??
Ответитьlink of the code doesn't work.
Ответитьmana telugollu eppudaina thope ehe.
ОтветитьWhat if we pass parameters while creating instance of class
Ответитьclear cut to the point explanation
Ответить