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
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.
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
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, 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 .
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, 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?
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
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 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 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
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.
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 Still there is a problem in this program that why it's shows in sufficient bal for simran. At line no. 16 same instance variable bal is used for both raj and simran I think it must be a formal variable . Like int newbal = bal-amt;
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..
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();} }
sirg plz mujhe ye samch mai nhi aa raha hai ki line no 7 mai apne (int w) jo argument liya hai wah kaise acces ho raha hai. usko to apne koi data hi nhi diya hai. kya yaha int type default value hai. sir appke video kamal ka hai .
right per yea ek chota sa program hai aage jake jab hazaro lines ke coding ati hai tab inka use hota hai ache se. yea bas concept clear karne ke liye hai
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
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
*s ir* thanks so much to making this video, sir mane synchronized() method ka use kre bena withdraw() function bnaya h , so kya mujhe ab synchronized ka use kerna chaye na nahi public void withdraw (int amt) { if(bal-withdraw>0) { bal =bal - amt; System.out.println("withdrawl money is "+amt); System.out.println("your current balance is "+bal); } }
afternoon sir am Ankit Sir i confused with a line in this program which is following {private Account account} sir plz tell me breifly this lin plz plz sir