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.
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, 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
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.
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
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 .
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
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 with same code , when I am writing" enter amount "inside synchronized block , I am getting thread exception for second object , but if I am writing enter amount outside sync blck it is working
Thank you so much sir, For this video still helpful to me and will helpful to us in future ❤️, And also sir let me know I want to develop *IOS Developer* Then what should I learn to become it ??
sir plzz make video on notify, notifyAll, wait, sleep method in detail with practical example..and what is deadlock, and how to cross calling in synchronised..
hello sir my IDE NetBeans show error Exception in thread "main" java.lang.UnsupportedOperationException: Not supported yet. at theardsexam.Theard.(Theard.java:15) at theardsexam.TheardsExam.main(TheardsExam.java:59) C:\Users\Edword\AppData\Local\NetBeans\Cache\8.2\executor-snippets un.xml:53: Java returned: 1 BUILD FAILED (total time: 0 seconds) in all programs of Theards
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, 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 you are great ...
your teaching method is awesome....
lots of prayer for you....
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 UA-cam FOR FREE THANK YOU SIR.
YOU ARE THE GOD IN TODAY'S ERA.
Ye to khatarnaak he explanation tha. All the doubts got extremely cleared.
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 .
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
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
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
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
Always gotta speed it up to 2x 😅
Mee
Me
Mee bro
@@PujaKumari-rp5sg hiii
me :)
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
very nice explanation sir with example... really you are a great teacher
You are very determined!
Thank you for all of your efforts!!!
sir you are genius
One of the best teacher❤
Problem solving approach is excellent...sir
really sir ! great teaching style , Thank u sir
sir u r so so so...... Great.... i really appreciate .
Don't say share .... already share this video in my Whatsapp Group.
This is called concept!!!!
26:18 sir maje ke mood me hain !!!!
so so............ awesome sir mind-blowing explained way
sir u r d best..........ap acha kaam kar re hai
you upload this video Dec 28, 2015 i take advantage in 20-12-2020
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?
Thank you very much sir. You have cleared all my doubts.
You are a great person May God bless you
Mja aagya dekh ke 😁😁
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.
Sir you are great man...God Bless U
shaandaar, Jabardast , Zindabaad
sir you r excellent lecturer,....
+honesty forever thanks please visit www.mysirg.com
@honesty forever are you placed now?
thank you sir aap ke samjhane ka tarika supar hai
aap se request hai ki android ka lecture v upload kijiye
Kaaafi gazab video, thanks sir!
Java by Saurabh Shukla Sir sir in dis video.in which line u hve made the object of class account ??
aap bahut achha kam kar rahe ho
Sir U r great, no words for giving thanku to u
Sir jab code thoda bada ho jaye to ek baar upar se niche poora show kr Diya kijiye. This helps in making notes.
Sir aapse to koi bewakoof bhi mahan ban Sakta hai
Thank You very much Sir
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
No need to study in college when saurabh sir is here💖💖💖
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?
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 .
Sir is work ko ham join(); se bhi kar sakte hain.
very nice explanation sir 🙏🙏🙏
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
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();}
}
sir ye synchronizing block ka kam join() method se v to perform kr skte hai na ?
me ye jan na chahta hu kya hum ek se jyada object bhi synchronized kar sakte he.
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
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
Thank You from 2020
Great sir.. really commendable work... Kindly share videos relevant to android app development if possible..
sir
private Account account ;
ye kya tha smz me nhi aaya
plz explain
Sir, agar Acount class ka reference variable na banaye or object bana sakte hai kya
nice shukla g..
Thanks alot sir.
So amazing voice
good session sir...i like.
thank you so......much..
sir you are very nice teacher and thnx for good explaning.
Sir plz upload a video of inter-thread communication, transient and volatile modifiers
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...
Amazing explanation sir
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.
Hi Saurabh, Can we simply synchronize the withdraw method to achieve same result?
sir aap great hai really.
my question is that we should always use synchronization where multiple threads use the same resource at same time.
sir mera to synchronization k bger b wese he chal rha hy...iski kya reason?
sir wesy hum join() method use kr k ye problem solve kr skty hain.
is this synchronization of multiple threads similar to just normal single threaded programming? Because i find them quite same.!!
Sir, why this program is so large?
Thanku for making such lectures, I am beginner
Great person
Sir with same code , when I am writing" enter amount "inside synchronized block , I am getting thread exception for second object , but if I am writing enter amount outside sync blck it is working
Can we extends account class to customer in this?
Legendary Teacher
Thank you so much sir, For this video still helpful to me and will helpful to us in future ❤️, And also sir let me know I want to develop *IOS Developer* Then what should I learn to become it ??
what has been done in the line:
private Account account;
i will be thankful if u explain the same
i am also in confusion
Its private instance variable of Account type... like we make int accNo....in this way..
Sir, what is the concept of MONITOR (also called Semaphore).. in synchronization??
And also.. MUTUALLY EXCLUSIVE LOCK or MUTEX...??
sir plzz make video on notify, notifyAll, wait, sleep method in detail with practical example..and what is deadlock, and how to cross calling in synchronised..
sir output alag aa raha he before synchronization ka dono ka withdrawl show nhi kar raha pls guide
thank you sirg.
great job man
very very nice tutorial,awesome
anil kushwahaji hlo what are you doing now days
Great lec!!! had a doubt ,, so in this did we create a Refrence variable "acc" of an object "a1"
you are the great sir g
Superb!! great work..! Really Appreciate it! ;) (Y) !
very gr8 video sir!!!
Sir , please make a video on interthread communication.
It's humble request to sir..
Gajab hai sir
hello sir my IDE NetBeans show error
Exception in thread "main" java.lang.UnsupportedOperationException: Not supported yet.
at theardsexam.Theard.(Theard.java:15)
at theardsexam.TheardsExam.main(TheardsExam.java:59)
C:\Users\Edword\AppData\Local\NetBeans\Cache\8.2\executor-snippets
un.xml:53: Java returned: 1
BUILD FAILED (total time: 0 seconds) in all programs of Theards
Hi Sir volatile key ka lecture i need to understand pls reply
Sir pls make the video on interthread communication
Nice video Sir. Can you share the link to this program?
Mind blowing sir
nice video sir g....
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