Posts

Showing posts with the label synchronized methods

Java Keywords (Part XXI): synchronized

Java keyword list abstract continue for new switch assert default goto * package synchronized boolean do if private this break double implements protected throw byte else import public throws case enum instanceof return transient catch extends int short try char final interface static void class finally long strictfp volatile const * float native super while Keyword marked with an asterisk (*) are keywords that, although valid, are not used by programmers. Before diving into the use of the synchronized keyword, we must understand concurrency. I will do my best to summarize the concept of concurrency first and then provide use cases for using synchronization. What is concurrency? The dictionary definition of the word concurrent is "occurring, arising, or operating at the same time." In computing, this means that a certain operation, or group of operations, must be executed at th