Java Tutorial # 24 | Thread Safety and code synchronization in java | Multithreading in Java part 3

preview_player
Показать описание
Thread Safety is very important factor when implementing multithreaded applications. Code Synchronization helps in preventing multiple threads to access same code at a given time. This tutorial explains how Code synchronization works and i have explained how Object Locks work with multiple threads.
Рекомендации по теме
Комментарии
Автор

I have never seen some1 give better real time examples than you do... simply superb.. appreciate your videos...

rakeshkonda
Автор

Your tutorials stand out from other ones because of the examples of real world scenarios. This really helps greatly to understand the concept more clearly. Keep up good work!

tariqahsan
Автор

Great series. I have gone through all of the videos. very nice explanations.

I revised java after 3 years and this video series is the only thing I went through. It was really a cake walk.

Thanking you from the bottom of my heart.

salmanCCIE
Автор

Awesome example to understand thread safety so easily.

tapasbhattacharya
Автор

Brilliant, crisp explaination, just what I needed! Thank you!

PMPhotographyVideography
Автор

My friends shout "Durga Software" like hell
java9s videos are way better than that excellent examples to understand
I just wish we had a teacher like you in college

dokwme
Автор

If a method is synchronized (If static or non static) any thread which is going to execute the method should acquire the lock. If it is a static menthod, the lock is acquired on the loaded class file and if it is a non static method, the lock is acquired on the object in which the method belongs to.
Just Remember - if there is synchronize - there is no concurrency at that place.

Hope this clarifies

javas
Автор

Are ob1, ob2, ob3, ob4 are classes?
If they are objects, how come one method m2 is sync in ob1 and not sync in ob2?

RaviTejaAnonymous
Автор

Watching your vids before I go to class so I understand it better, thank you for your excellent videos! Nailed it

sarahh
Автор

Thank you...Very simple and easy explanation

bhanuprathap
Автор

I am watching this felt happy !!! 
upload more related lot.

rameshp
Автор

Far better than my college professor, thank you.

agustinfreiberger
Автор

Thank you very much for uploading such great videos on multi threading. It was really helpful. I have some questions on object level and class level locks. If 2 methods are there, 1 with static synchronized and the other with non static synchronize and its being called by two threads at the same time, will the threads be executed concurrently if not then how its going to work.
Thanks
Sunny

sunnyghosh
Автор

i just tried access your example, but unfortunately it only shows a text "pageok",

ajimulyadi
Автор

14:17 why locks are on object level ??

avijitsharma
Автор

I love that you use a proportional font <3

kookoon
Автор

Really nyc tuts ! Learned very easily! Thank u ! Java9s

KaranSheth
Автор

I've learned so much from these videos, really great.

richardmarton
Автор

applications you have explained to understand the concepts are awsome..

SplunkTalks
Автор

Thanks for this. Like the way you have simplified the examples from Kathie Sierra. Just what I needed to brush up before an interview. Thanks once again

santoshpillai
welcome to shbcf.ru