Singletons | What When How 🔥

  Рет қаралды 31,968

Mafia Codes

Mafia Codes

Күн бұрын

In this video we will be looking into Singletons.
Singletons are classes that are instantiated only once in application and are globally accessible by any part of the application.
⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I've been using Kite for 6 months and I love it! www.kite.com/get-kite/?...
FREE $100 credit @Digital Ocean: m.do.co/c/3208f08b3324
Patreon: / trulymittal
Subscribe: kzfaq.info...
---------------
What I use
---------------
Mouse: amzn.to/2O9RJtu
Keyboard: amzn.to/2qxajCU
Keyboard 2: amzn.to/2XDWH4X
Monitor: amzn.to/2pDg7dH
Processor: amzn.to/347WWIb
RAM: amzn.to/2QEkUqw
Graphics: amzn.to/33aBrF4
Microphone: amzn.to/2DabdI9
#yoursTruly #android #java #CSS #javascript #ES6 #html #ios #swift #nodejs #coding #programming #tutorial #howto

Пікірлер: 61
@brdlmn
@brdlmn 2 жыл бұрын
Bro (or should I say teacher) u deserved 100-500k subs with this kind of explanation!
@mafiacodes
@mafiacodes 2 жыл бұрын
People don’t subscribe only watch 😢
@muhammadmoin74
@muhammadmoin74 3 жыл бұрын
Amazingly the most crystal clear explanation of singletons.
@anitaig05
@anitaig05 3 жыл бұрын
Nice work! simple and easy to follow - thank you!!!
@BughraBoy
@BughraBoy 3 жыл бұрын
This is an amazing explanation of Singleton pattern!! Thank you
@SiyamSajnanChowdhury
@SiyamSajnanChowdhury 4 жыл бұрын
Damn bro, this cleared singleton for me as clear as day. Subscribed!
@ZanarkandStarplayer
@ZanarkandStarplayer 2 жыл бұрын
Great explanation, this was easy to keep up!
@uskapyaar8852
@uskapyaar8852 2 жыл бұрын
loved the details
@_AryaDarvekar
@_AryaDarvekar 2 жыл бұрын
Thankyouuu 🙌🏻
@nishant_raj312
@nishant_raj312 3 жыл бұрын
Amazing Explantion !!! , You made it pretty simple. Have you explained more design patterns?
@jingu127
@jingu127 3 жыл бұрын
Thanks for the great sharing!
@hanumantharaotalluri4212
@hanumantharaotalluri4212 2 жыл бұрын
Excellent explained.thank you
@jaswantmoryani608
@jaswantmoryani608 2 жыл бұрын
Truly amazingly explained
@barsapriyadarshinijena2084
@barsapriyadarshinijena2084 2 жыл бұрын
You explain it on a excellent way 😃
@mayurkakade8397
@mayurkakade8397 3 жыл бұрын
great speech delivery 👍
@shamsali9807
@shamsali9807 4 жыл бұрын
Your way of teaching is so simple and clear. Sir just keep doing Great work. Excellent :)
@mafiacodes
@mafiacodes 4 жыл бұрын
Thanks 😊 subscribe like share
@chandankarmakar6651
@chandankarmakar6651 2 жыл бұрын
Wow! Amazing explanation! Simply Awesome!
@mafiacodes
@mafiacodes 2 жыл бұрын
Subscribe like share
@chmanikanta4158
@chmanikanta4158 3 жыл бұрын
Great expectation bro, now I understand everything
@mafiacodes
@mafiacodes 3 жыл бұрын
subscribe like share
@amudharasik3844
@amudharasik3844 3 жыл бұрын
Thank you sir
@ziczaces4459
@ziczaces4459 2 жыл бұрын
Great explanation .... you should have more thumbs up
@soniahussain5912
@soniahussain5912 3 жыл бұрын
I love this video
@vengateshm2122
@vengateshm2122 3 жыл бұрын
Super explanation
@muazbhatti41
@muazbhatti41 3 жыл бұрын
Amazingly explained ❣️
@mafiacodes
@mafiacodes 3 жыл бұрын
Glad you liked it
@ahmednafiunoman5040
@ahmednafiunoman5040 3 жыл бұрын
Best sigletons explanier award goes to .....YOU
@avdhutmahadik4147
@avdhutmahadik4147 4 жыл бұрын
bro there is an extra closing brace in the wring way of lazy initialization , cool video cheers !!
@mafiacodes
@mafiacodes 4 жыл бұрын
😂 subscribe like share
@alittlecoding
@alittlecoding 2 жыл бұрын
useful video
@vinathasree168
@vinathasree168 2 жыл бұрын
sir what is the difference between object and an instance would u pls reply
@Runnable19
@Runnable19 3 жыл бұрын
Thread access: The wrong way and the right way seemed to be exactly the same except for the synchronized block but it still does exactly the same thing. Or at least that's how it apears to me.
@mafiacodes
@mafiacodes 3 жыл бұрын
Without the synchronised block there will be race conditions
@altered.thought
@altered.thought 3 жыл бұрын
now i know singletons 😃
@HuntingAndFishingPakistan
@HuntingAndFishingPakistan 2 жыл бұрын
Thank you
@sachetthashrestha539
@sachetthashrestha539 5 жыл бұрын
Greaaaattttt! We want more android content ❤️
@mauricejay7806
@mauricejay7806 3 жыл бұрын
i guess I'm kinda off topic but does anyone know a good site to stream new movies online ?
@zahiredward3884
@zahiredward3884 3 жыл бұрын
@Maurice Jay lately I have been using FlixZone. Just search on google for it :)
@shubhs.2803
@shubhs.2803 2 жыл бұрын
is singleton class object same for whole package or for a class only
@mafiacodes
@mafiacodes 2 жыл бұрын
whole package
@YashNagayach
@YashNagayach 4 жыл бұрын
IN DOUBLE CHECKED LOCKING MECHANISM, WHAT IS THE NEED OF CHECKING if (INSTANCE == null) again inside synchronized. I don't think it is of any use, if we have already checking above for null. Any Idea??
@mafiacodes
@mafiacodes 4 жыл бұрын
Watch at 4:50.
@sukhmandersingh4306
@sukhmandersingh4306 2 жыл бұрын
After thread 'a' completes the synchronized block 'instance' has been initialized and is no longer null. Now 'b' enters the block and needs to check this to use the existing instance and not create a new one.
@sase1017
@sase1017 2 жыл бұрын
But why do we need singleton at the first place? what s the use case?
@mafiacodes
@mafiacodes 2 жыл бұрын
The video has the answer as to WHY?
@abdallawanjusi
@abdallawanjusi 3 жыл бұрын
How to access single tone in 2b (multi thread)
@mafiacodes
@mafiacodes 3 жыл бұрын
using the getInstance() method...ex: ClassName.getInstance()
@abdallawanjusi
@abdallawanjusi 3 жыл бұрын
I mean how do I use it with stringRequest in requestQueu
@abdallawanjusi
@abdallawanjusi 3 жыл бұрын
For example how do I use it in this case. RequestQueue request = Volley.newRequestQueue(this); request.add(stringRequest);
@mafiacodes
@mafiacodes 3 жыл бұрын
I m still not getting what you need?
@soniahussain5912
@soniahussain5912 3 жыл бұрын
It will help my children
@mafiacodes
@mafiacodes 3 жыл бұрын
Great 👍
@buzzminkyunghoon3856
@buzzminkyunghoon3856 5 жыл бұрын
MVVM, Night Mode, Google Maps tutorials.
@mafiacodes
@mafiacodes 5 жыл бұрын
Can watch view model @ kzfaq.info/get/bejne/n5hinduers7DdXk.html Rest will be coming soon
@buzzminkyunghoon3856
@buzzminkyunghoon3856 5 жыл бұрын
@@mafiacodes Thanks I have watched. It was so simple because you explained it. Keep up.
@mafiacodes
@mafiacodes 5 жыл бұрын
Night mode video is done, just a couple of days to edit and upload 😊
@shaikhabdulbasit5717
@shaikhabdulbasit5717 2 жыл бұрын
Y u sound like Uguruz
@mafiacodes
@mafiacodes 2 жыл бұрын
Subscribe Like Share
@noah_ayyubi
@noah_ayyubi Жыл бұрын
ur not explaining ur just reading it off the internet, i could do the same
@arjunsingh4514
@arjunsingh4514 11 ай бұрын
do it then
Date Picker & Time Picker | Android 🔥
14:41
Mafia Codes
Рет қаралды 23 М.
How to BREAK and FIX Singleton Design Pattern | Interview Question
19:32
Daily Code Buffer
Рет қаралды 31 М.
Опасность фирменной зарядки Apple
00:57
SuperCrastan
Рет қаралды 12 МЛН
لقد سرقت حلوى القطن بشكل خفي لأصنع مصاصة🤫😎
00:33
Cool Tool SHORTS Arabic
Рет қаралды 29 МЛН
MISS CIRCLE STUDENTS BULLY ME!
00:12
Andreas Eskander
Рет қаралды 20 МЛН
路飞太过分了,自己游泳。#海贼王#路飞
00:28
路飞与唐舞桐
Рет қаралды 39 МЛН
Singleton Design Pattern in C# - Do it THAT way
13:15
tutorialsEU - C#
Рет қаралды 24 М.
The Story of Next.js
12:13
uidotdev
Рет қаралды 560 М.
Singleton - Good or Bad?
9:41
iCode
Рет қаралды 10 М.
Factory Design Pattern - Why and How with Code!!
15:35
Keerti Purswani
Рет қаралды 80 М.
Singleton Design Pattern (C#, Microservices)
15:22
Raw Coding
Рет қаралды 13 М.
6 Design Patterns Every Android Developer Must Know
14:16
Philipp Lackner
Рет қаралды 79 М.
Pydantic Tutorial • Solving Python's Biggest Problem
11:07
pixegami
Рет қаралды 256 М.
Singleton Design Pattern with thread safety in C++
14:08
E-GRASP
Рет қаралды 8 М.
Singleton Pattern - Design Patterns (ep 6)
20:09
Christopher Okhravi
Рет қаралды 247 М.
Опасность фирменной зарядки Apple
00:57
SuperCrastan
Рет қаралды 12 МЛН