Skip to content

Commit 948edff

Browse files
committed
Migrate development environment from Windows to macOS and continue project updates
- Shifted primary development environment from Windows to macOS to ensure better performance, stability, and streamlined workflow for Java development. - Removed OS-specific metadata and ensured platform-agnostic project compatibility. - Normalized line endings to LF for cross-platform consistency. - Verified and adjusted file paths, permissions, and encoding settings to suit macOS environment. - Cleaned up unnecessary Windows-generated files and updated Git configuration accordingly. - Future commits and development will now be managed entirely from macOS. This migration ensures a cleaner, more consistent setup moving forward and prepares the project for scalable development across Unix-based systems. Future development will continue on macOS for a smoother, Unix-based experience. Signed-off-by: Someshdiwan <[email protected]>
1 parent b43e485 commit 948edff

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed

site/content.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,67 @@ It emphasizes robust error handling practices that enhance application stability
10271027

10281028
### [🧵 Section 19 MultiThreading On GitHub](https://github.com/Someshdiwan/JavaEvolution-Learning-Growing-Mastering/tree/master/Section19MultiThreading/)
10291029

1030+
This comprehensive section delves into the **multithreading and concurrency** features of Java—from the basics of thread
1031+
creation to advanced topics like deadlocks, thread safety, and modern thread pooling.
1032+
1033+
1034+
#### 🧠 Combined Summary:
1035+
1036+
- **Thread Basics**:
1037+
- Files like `MethodsInThread.java`, `ThreadNewMethods.java`, `ThreadsMethods.java`, and `YeildMethodInThread.java`
1038+
cover creating threads using `Thread` and `Runnable`, along with lifecycle methods like `start()`, `run()`, `join()`, `yield()`, etc.
1039+
1040+
- **Synchronization & Thread Communication**:
1041+
- `Synchronization.java`, `WhiteboardTeacherStudent.java`, and the entire `Synchronization/` folder handle
1042+
**synchronized blocks**, object locks, and the classic **producer-consumer** patterns.
1043+
- Key issues like **unfair locking**, **synchronization drawbacks**, and **race conditions** are addressed in
1044+
`.txt` resources.
1045+
1046+
- **Deadlock & Thread Safety**:
1047+
- `DeadLock/` folder demonstrates deadlock-prone scenarios and ways to avoid them.
1048+
- Multiple `.txt` files explain **thread safety strategies** and **real-world scenarios**.
1049+
1050+
- **Locks Framework**:
1051+
- Found under `Locks/`, this explores `ReentrantLock`, `ReadWriteLock`, and the **difference between fair and
1052+
unfair locks**.
1053+
- `Distributed Locking` and `ReentrantLock allows the same thread to acquire the lock multiple times!.txt`
1054+
hint at deeper practical usage.
1055+
1056+
- **Thread Pooling (Executors)**:
1057+
- Covered in the `ThreadPooling/` folder, explaining `ExecutorService`, `Callable`, `Future`, `CompletableFuture`,
1058+
and coordination tools like `CountDownLatch` and `CyclicBarrier`.
1059+
1060+
- **Volatile & Atomic**:
1061+
- Under `Volatile and Atomic/`, Java's memory consistency using the `volatile` keyword (`VolatileExample.java`,
1062+
`VolatileCounter.java`) and atomic operations using `AtomicInteger` (`AtomicExample.java`) are demonstrated.
1063+
1064+
- **Real-World Simulations**:
1065+
- `ATMMoney.java`, `PrintHelloSimulteneously.java`, and `WhiteboardTeacherStudent.java` simulate
1066+
multithreaded environments, illustrating key concepts like synchronization, wait/notify, and shared resources.
1067+
1068+
- **Interview Prep**:
1069+
- `Interview Basic Questions.txt`: A curated list of important multithreading questions to ace Java developer interviews.
1070+
1071+
---
1072+
1073+
```
1074+
1075+
🧠 Related Topic Overview:
1076+
1077+
| Concept | Explanation |
1078+
|----------------------------------|-----------------------------------------------------------------------------|
1079+
| Thread, Runnable | Base classes/interfaces for creating threads |
1080+
| synchronized, wait/notify | Object-level locks and inter-thread signaling |
1081+
| volatile | Ensures visibility of shared variables across threads |
1082+
| AtomicInteger | Lock-free, thread-safe operations on single variables |
1083+
| ExecutorService | Manages thread pools with better control (shutdown, task submission) |
1084+
| CompletableFuture | Async programming with callbacks and chaining (non-blocking) |
1085+
| ReentrantLock,ReadWriteLock | Advanced locking with finer-grained control over access |
1086+
| Deadlock | Circular waiting → prevent with proper lock ordering or timeouts |
1087+
| CountDownLatch, CyclicBarrier | Tools to coordinate threads reaching common state |
1088+
1089+
```
1090+
10301091
---
10311092

10321093
## Part 1: Deadlocks in Java
@@ -1572,6 +1633,37 @@ You dive into **generic classes, interfaces, and wildcards** — foundational fo
15721633

15731634
### [Section24 Java Generics Type Safe Data Structures On GitHub](https://github.com/Someshdiwan/JavaEvolution-Learning-Growing-Mastering/tree/master/Section24JavaGenerics)
15741635

1636+
#### 🧠 Combined Summary:
1637+
1638+
- **Generic Classes**:
1639+
- `GenericClass/Pair.java`, `Box.java`, `BoxIMP.java`: Define generic classes like `Pair<K,V>` or `Box<T>` to hold objects of any type safely.
1640+
- `Main.java`: Showcases how to create and use these classes with actual types.
1641+
1642+
- **Generic Interfaces**:
1643+
- `GenericInterfaces.java`, `StringContainer1.java`, `Employee1.java`: Demonstrate how to define and implement interfaces that work with generic types.
1644+
- Useful for APIs that handle collections, services, or containers.
1645+
1646+
- **Generic Methods & Utilities**:
1647+
- `GenericFunctionsExample.java`, `GenericDemo.java`, `GenericClassDemo.java`: Use generics in methods for flexible and reusable logic.
1648+
- Great for sorting, swapping, or processing elements in collections.
1649+
1650+
- **Bounded Types (Upper & Lower Bounds)**:
1651+
- `Upper and Lower Bounds in Java Generics.txt`: Learn how to **restrict generics** using `extends` and `super` to work with specific type hierarchies.
1652+
- Wildcards (`<?>`, `<? extends T>`, `<? super T>`) add power and flexibility when dealing with generic data.
1653+
1654+
- **Wildcard Use-Cases**:
1655+
- `Java Generics Wildcards, Generic Methods, and Super Bounds.txt`: Deep dive into when and why to use wildcards, especially for reading/writing from lists.
1656+
1657+
- **Foundational Notes**:
1658+
- `WhyGenerics.java`, `Generics in Java.txt`: Explain the motivation behind generics—type safety, DRY code, compile-time checks, and avoiding casting.
1659+
1660+
---
1661+
1662+
📘 **Pro Tips**:
1663+
- Use `<? extends T>` when you only want to **read** from a structure.
1664+
- Use `<? super T>` when you only want to **write** into a structure.
1665+
- Prefer generics to raw types to prevent **ClassCastException** at runtime.
1666+
15751667
### <sup><sub>[▲ TOP](#table-of-contents)</sub></sup>
15761668

15771669
---

0 commit comments

Comments
 (0)