admin

admin

Encapsulation and Access Modifiers

Controlling Access to Class Members Modifier Class Package Subclass World public Y Y Y Y protected Y Y Y N no modifier Y Y N N private Y N N N Tips on Choosing an Access Level Encapsulation Properly encapsulated…

Syncronization and Concurrency Utilities

Synchronization When two or more threads need access to a shared resource, they need some way to ensure that the resource will be used by only one thread at a time. The process by which this is achieved is called synchronization.  Thread Communication…

Multithreading and Concurrency

Multithreaded Programming Multithreaded Fundamentals Process vs Thread Thread States The Thread Class and Runnable Interface Java’s multithreading system is built upon the Thread class, its methods, and its companion interface, Runnable. Thread encapsulates a thread of execution. Since you can’t directly refer to the…