Learn Java Programming - Synchronized Static Method Tutorial

Published: 23 December 2015
on channel: Daniel Ross
3,879
32

The synchronized keyword can be applied to a method or a block of code. The primary purpose of the synchronized keyword is to lock a shared resource to a single thread. The technical term for locking a resource is called an intrinsic lock or monitor lock. In this tutorial I will demonstrate populating an ArrayList from multiple threads using the non-thread-safe add() method. This tutorial will demonstrate applying the synchronized keyword to a static method and a code block to make our method thread safe.


On this page of the site you can watch the video online Learn Java Programming - Synchronized Static Method Tutorial with a duration of hours minute second in good quality, which was uploaded by the user Daniel Ross 23 December 2015, share the link with friends and acquaintances, this video has already been watched 3,879 times on youtube and it was liked by 32 viewers. Enjoy your viewing!