SAUSECODE

“Source code. Sauce code. Sause code. It compiled — feature, not a bug.”

Tag: java

  • ReentrantLock in Java

    ReentrantLock in Java

    The Core Architecture 1. Basic Locking & Mutual Exclusion 2. The Meaning of “Re-entrant” 3. Execution Control: Fair vs. Unfair 4. Advanced Lock Interrogation (tryLock) Concrete Example – Movie Seat Booking Let’s apply this directly to the multi-threaded movie theater booking example. Advanced Signaling with newCondition() Mutual exclusion solves the problem of writing data safely,…

  • OOP in a Nutshell – Java!

    OOP in a Nutshell – Java!

    Object Orientend Programming – The Core Concept Think of OOP as creating blueprints for real-world entities. Instead of just writing lines of sequential logic, you group data and behavior together into a blueprint (Class) to create individual items (Objects). 4 Pillars of OOP Inheritance Children get features/traits from parents, It promotes code reuse and establishes…