- FutureExample - Callables, Future, ExecutorService, etc.
- AdderSubtractor - Adder Subtractor problem (Thread synchronization) solution
- using Locks which adds some extra logic to the business logic in Adder or Subtractor
synchronized
keyword which abstracts away the synchronization logic using monitors or method level synchronization
- ProducerConsumer - Producer Consumer Problem solution
- bad : producer consumer threads without synchronization
- notsogood : Uses Mutex (i.e.
Lock
) to synchronize the threads, but it's not performant since only one thread allowed to produce or consume at a time. - good : Uses
Semaphore
as a signaling mechanism so that multiple threads can access critical section - Ref : Mutex Vs Semaphore
- LambdaAndStreams - Examples of functional interfaces, lambdas & Java stream basics
- Single Responsibility Principle
- Open-Closed Principle
- Liskov Substitution Principle
- Interface Segregation
- Dependency Inversion
- creational - Creational Design Patterns
- Singleton
- Builder
- Prototype
- Simple factory, factory method,
- Abstract factory
- structural - Structural Design patterns
- Decorator
- Adapter
- Flyweight
- Composite
- behavioral - Behavioral Design Patterns
- Observer
- Strategy