At 26:25 : D Sir, Bade bade programs mein chhote chhote mistakes hote rehte hai Really worthy to watch this playlist even in 2020 :-) Finally watched 40 videos upto now.... All of them are quite informative, and are explained deeply with simplest possible explanation... Thank you so much for this
Sir aapka padane ka tarika bahut acha h jese ki aap phle live example dekar samja dete. Ho and baad m usi ko point m likh dete ho jisse ki student apni copy m note kr sake or baad m rivision kr sake jisse ki sari information subconscious mind m store ho jaye thank you sir Vande matram
Thanks a lot for uploading it... You are doing a great job.. Please friends let me know how this poem is- I am alone...- I am alone, In my life. I am alone, In my way. No one here, To call as dear. No one there, To call as fair. Everything scattered nothing set, Just to bear,never to get ? -By Tapanjeet Roy
You're the best teacher. Best explanation for everything. Thanks for the videos. PS: The paint section is really ugly please replace it with something else.
sir, you are the best one I have seen so many videos on youtube but you are the best... the way of explaining awesome sir....really thank you so much....please make some videos on how to get a job as java developer as fresher...step by step with some important question ...please sir, its humble request sir...thanks
you are a good man sir and a great teacher. i wis uwere our college faculty in our Computer Science department.Our departmet really needs you and your teaching
Sir, First thank you so much for uploading this video. I can't understand 'Private Account account'.Can you please explain? and one more thing,Can you please provide the full code in comment section?
Have one doubt.. we are using threading for parallel run of a code. But using Synchronized we are anyhow stopping one thread and running the other one. So aren't we indirectly following linear execution for certain time? I am aware that it will be so fast that we can't even see this difference but just quoting a doubt in general...!! Btw thanks a lot for these amazing videos...!!
Your code might have 1000 lines and only 5 lines of code needed shared resources, so rather than executing whole 1000 lines in linear fashion you can just synchronize that 5 lines.
sir, i really really like your each videos & your teaching and your doing great work. i have share this channel to my colleagues friends . sir i have a request can u upload a easy readable notes for every programming language u teach. and i feel like there should be a professor like you in every IT colleges .
Respected sir i Salute you sir.You are very awesome. I beg you sir please tell about Applet Class, Architecture, Skeleton, Display Methods. Swings: Japplet, Icons, labels, Text Fields, Buttons, Combo Boxes.
+Alok Srivastava they are in the pipeline, coming very soon. I am currently uploading one video per day, but planning to upload 2 videos per day. Please visit www.mysirg.com for all updates
Ye baat Customer Class me likhi hai aur object to ExampleThread me call hua hai to Customer class me call karne k liye account variable ki help li hai I have a better modified code for the Same program. Check here: import java.util.Scanner; class Account { private int bal; public Account(int bal) { this.bal=bal; } public void isSufficientBalance(int w) { if (bal>w) { bal=bal-w; System.out.println("withdral money"+w); System.out.println("your current balance:"+bal); } else { System.out.println("Insufficient balance");} } } class Customer implements Runnable { private String name; private Account account; public Customer(Account account, String n) { this.account=account; name=n; } public void run () {Scanner kb=new Scanner(System.in); synchronized(account){ System.out.println(name+": Enter amount to withdraw"); int amt=kb.nextInt(); account.isSufficientBalance(amt);} } } public class ExampleThread { public static void main(String [] args) { Account a1=new Account(1000); Customer c1=new Customer(a1, "PRIYANSH"); Customer c2=new Customer(a1, "KABIR"); Thread t1=new Thread(c1); Thread t2=new Thread(c2); t1.start(); t2.start();} }
he declared a variable of account class in customer class. So that this variable can be put in constructor of Customer to point at object of Account class
see i also got same doubt !look carefully he created Account type variable "account" thats why account could able to all the functions in the class Account because "account" is a Account type variable ! hope you understood
Sir why have u written private Account account in customer class..i am not able to understand...we have not made object of account in customer and then we can access the account class
In inheritance you are actually extending the existing class , it will be pro version of previous class. Where when you are passing object of one class in another class you are just calling functions of another class through functions of this class. But no direct connections between both classes.
Sir aap bhut acha samjhate ho no doubt...... But threads wale sare topics me aapke code run nhi kr rhe h accordingly........ Ya to java ka compiler upgrade hone ki wajh se h ya fir kuch aur wajh h
Sir, you really deserve respect for providing your lectures free.Thank you
At 26:25 : D Sir, Bade bade programs mein chhote chhote mistakes hote rehte hai
Really worthy to watch this playlist even in 2020 :-) Finally watched 40 videos upto now....
All of them are quite informative, and are explained deeply with simplest possible explanation...
Thank you so much for this
How anyone can teach at extreme level ? Sir u are superb , legend !! At 2020 I am studying java with ur videos. Thanks a lot for these videos.👍
I had been confused as of how Synchronization works !!! Now i have a clear picture!!! Thanks!!!
Sir aapka padane ka tarika bahut acha h jese ki aap phle live example dekar samja dete. Ho and baad m usi ko point m likh dete ho jisse ki student apni copy m note kr sake or baad m rivision kr sake jisse ki sari information subconscious mind m store ho jaye
thank you sir
Vande matram
sir very good explanation, nice 👍🙂
ONE OF THE BEST EXPLANATION ON RUclips FOR FREE THANK YOU SIR.
YOU ARE THE GOD IN TODAY'S ERA.
sir you are great ...
your teaching method is awesome....
lots of prayer for you....
SIR u r great ...lots of prayer for you...thanks for all videos..can u plz upload lectures about database connection with java???
+abbas Khan coming soon
sir monday ko paper ha upload kar da
Java by Saurabh Shukla Sir sir in dis video.in which line u hve made the object of class account ??
@@javabysaurabhshuklasir3459 i also waiting for this lecture
@@javabysaurabhshuklasir3459 .
Ye to khatarnaak he explanation tha. All the doubts got extremely cleared.
Thanks a lot for uploading it... You are doing a great job..
Please friends let me know how this poem is-
I am alone...-
I am alone,
In my life.
I am alone,
In my way.
No one here,
To call as dear.
No one there,
To call as fair.
Everything scattered nothing set,
Just to bear,never to get ?
-By Tapanjeet Roy
tapanjeet roy nice poem
@@shubhammishra8760 Thanks brother
sir you are genius
You're the best teacher. Best explanation for everything. Thanks for the videos.
PS: The paint section is really ugly please replace it with something else.
Sir you have given the bestest explanation of synchronization of multiple threads. Thanks sir
Sir is work ko ham join(); se bhi kar sakte hain.
Love you sir clearly understand the problem and how to handle it thanks sir love from nagpur 💯
Your explainations are really awesome.....hat's off.
Thanks
One of the best teacher❤
Mja aagya dekh ke 😁😁
This is called concept!!!!
very nice explanation sir with example... really you are a great teacher
sir u r so so so...... Great.... i really appreciate .
Don't say share .... already share this video in my Whatsapp Group.
sir, you are the best one I have seen so many videos on youtube but you are the best... the way of explaining awesome sir....really thank you so much....please make some videos on how to get a job as java developer as fresher...step by step with some important question ...please sir, its humble request sir...thanks
really sir ! great teaching style , Thank u sir
You are very determined!
Thank you for all of your efforts!!!
you are a good man sir and a great teacher. i wis uwere our college faculty in our Computer Science department.Our departmet really needs you and your teaching
so so............ awesome sir mind-blowing explained way
shaandaar, Jabardast , Zindabaad
sir u r d best..........ap acha kaam kar re hai
Problem solving approach is excellent...sir
26:18 sir maje ke mood me hain !!!!
Sir,
First thank you so much for uploading this video.
I can't understand 'Private Account account'.Can you please explain?
and one more thing,Can you please provide the full code in comment section?
Have one doubt.. we are using threading for parallel run of a code. But using Synchronized we are anyhow stopping one thread and running the other one. So aren't we indirectly following linear execution for certain time? I am aware that it will be so fast that we can't even see this difference but just quoting a doubt in general...!! Btw thanks a lot for these amazing videos...!!
i also have this doubt.... anyone pls help
Your code might have 1000 lines and only 5 lines of code needed shared resources, so rather than executing whole 1000 lines in linear fashion you can just synchronize that 5 lines.
you upload this video Dec 28, 2015 i take advantage in 20-12-2020
Java by Saurabh Shukla Sir sir in dis video.in which line u hve made the object of class account ??
Sir ,
private Account account ;
Line samaj nahi aai
Same bro 🙂
Kaaafi gazab video, thanks sir!
sir you r excellent lecturer,....
+honesty forever thanks please visit www.mysirg.com
@honesty forever are you placed now?
You are a great person May God bless you
sir, i really really like your each videos & your teaching and your doing great work. i have share this channel to my colleagues friends . sir i have a request can u upload a easy readable notes for every programming language u teach. and i feel like there should be a professor like you in every IT colleges .
Thanks for share video, I like your approach to explain concept in very easy manner. I request you to upload video of collection framework in JAVA.
Are you placed now?
@@kshitijbisht8859 Are you placed now?
Always gotta speed it up to 2x 😅
Mee
Me
Mee bro
@@PujaKumari-rp5sg hiii
me :)
Sir jab code thoda bada ho jaye to ek baar upar se niche poora show kr Diya kijiye. This helps in making notes.
Sir you are great man...God Bless U
sir
private Account account ;
ye kya tha smz me nhi aaya
plz explain
thank you sir aap ke samjhane ka tarika supar hai
aap se request hai ki android ka lecture v upload kijiye
Thank You from 2020
nice shukla g..
Thank you very much sir. You have cleared all my doubts.
aap bahut achha kam kar rahe ho
me ye jan na chahta hu kya hum ek se jyada object bhi synchronized kar sakte he.
Great person
Sir why the method void withdrawn of class account is running ,as we have not called it just we have made object we have not written like a1.withdrawn
Sir U r great, no words for giving thanku to u
Can we extends account class to customer in this?
sir ye synchronizing block ka kam join() method se v to perform kr skte hai na ?
Respected sir i Salute you sir.You are very awesome.
I beg you sir please tell about Applet Class, Architecture, Skeleton, Display Methods. Swings: Japplet, Icons, labels, Text Fields, Buttons, Combo Boxes.
+Alok Srivastava they are in the pipeline, coming very soon. I am currently uploading one video per day, but planning to upload 2 videos per day. Please visit www.mysirg.com for all updates
Great sir.. really commendable work... Kindly share videos relevant to android app development if possible..
Sir aapse to koi bewakoof bhi mahan ban Sakta hai
Thank You very much Sir
Sir, agar Acount class ka reference variable na banaye or object bana sakte hai kya
Gajab hai sir
sir
private Account account
ye samajh ni aaya
plz help me
It is actually passing the reference of Account class in account and passing this account to a customer.
cheers
@@priencthakur7602 like whole Account class reference in just one variable ?
please any 1 explain 18:44 in that sir said account ka object hai na hamare pass...! how did he wrote account.isSufficientBalance plz explain
Ye baat Customer Class me likhi hai aur object to ExampleThread me call hua hai to Customer class me call karne k liye account variable ki help li hai
I have a better modified code for the Same program. Check here:
import java.util.Scanner;
class Account
{
private int bal;
public Account(int bal)
{ this.bal=bal; }
public void isSufficientBalance(int w)
{ if (bal>w)
{ bal=bal-w;
System.out.println("withdral money"+w);
System.out.println("your current balance:"+bal); }
else
{ System.out.println("Insufficient balance");} }
}
class Customer implements Runnable
{
private String name;
private Account account;
public Customer(Account account, String n)
{ this.account=account; name=n; }
public void run ()
{Scanner kb=new Scanner(System.in);
synchronized(account){
System.out.println(name+": Enter amount to withdraw");
int amt=kb.nextInt();
account.isSufficientBalance(amt);} }
}
public class ExampleThread
{
public static void main(String [] args)
{ Account a1=new Account(1000);
Customer c1=new Customer(a1, "PRIYANSH");
Customer c2=new Customer(a1, "KABIR");
Thread t1=new Thread(c1);
Thread t2=new Thread(c2);
t1.start();
t2.start();}
}
Hi Saurabh, Can we simply synchronize the withdraw method to achieve same result?
Confused in line( private Account account )
me bhi
i also
he declared a variable of account class in customer class. So that this variable can be put in constructor of Customer to point at object of Account class
very nice explanation sir 🙏🙏🙏
Legendary Teacher
sir mera to synchronization k bger b wese he chal rha hy...iski kya reason?
hello sir at 18:42 apne account class ka object bnaye bina account class ke sirf reference variable se account class ka function kaise call kiya?
see i also got same doubt !look carefully he created Account type variable "account" thats why account could able to all the functions in the class Account because "account" is a Account type variable ! hope you understood
sir aap great hai really.
At 18:43 , you say that we have an object of account class but that's not an object...we only made a reference variable. Please Explain
haa prr upr dekho hmne acc ka members use krne se pehle usko a1 account ka obj pass krdya account refrence mai...
No need to study in college when saurabh sir is here💖💖💖
good session sir...i like.
thank you so......much..
you are the great sir g
Amazing explanation sir
#GREAT_SIR
sir output alag aa raha he before synchronization ka dono ka withdrawl show nhi kar raha pls guide
Sir why have u written private Account account in customer class..i am not able to understand...we have not made object of account in customer and then we can access the account class
sir,
what is a difference between inheritance and passing an object of one class into object of another class
In inheritance you are actually extending the existing class , it will be pro version of previous class. Where when you are passing object of one class in another class you are just calling functions of another class through functions of this class. But no direct connections between both classes.
sir wesy hum join() method use kr k ye problem solve kr skty hain.
sir i did not understand the reference you that is Account account in customer class
Mind blowing sir
Sir aap bhut acha samjhate ho no doubt...... But threads wale sare topics me aapke code run nhi kr rhe h accordingly........ Ya to java ka compiler upgrade hone ki wajh se h ya fir kuch aur wajh h
Thanks sir🙏🙏🙏
is this synchronization of multiple threads similar to just normal single threaded programming? Because i find them quite same.!!
Great lec!!! had a doubt ,, so in this did we create a Refrence variable "acc" of an object "a1"
Sir you are Great
very gr8 video sir!!!
Thanks alot sir.
So amazing voice
Sir, why this program is so large?
Thanku for making such lectures, I am beginner
Thanks so much 😊❤️❤️😊
nice video sir g....
Love you sir...💜
Sir, what is the concept of MONITOR (also called Semaphore).. in synchronization??
And also.. MUTUALLY EXCLUSIVE LOCK or MUTEX...??
Hi Sir volatile key ka lecture i need to understand pls reply
Sir,
What is Daemon Thread ?
Buhut Aaala
great job man
sir you are very nice teacher and thnx for good explaning.
Sir plz upload a video of inter-thread communication, transient and volatile modifiers
Superb!! great work..! Really Appreciate it! ;) (Y) !