Commit 79a11ce
authored
Updated base (#10)
* Not updated section. Update you and contribute to this section.
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* Not updated section. Update you and contribute to this section.
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* Updated Readme
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* README.md
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: Add ArrayListDemo7 to explore constructors
and methods via reflection
This demo showcases how to use Java
Reflection API to inspect the
internal structure of the ArrayList class.
Key highlights:
• Obtains the Class object for java.util.ArrayList using ArrayList.class.
• Retrieves all declared constructors with getDeclaredConstructors().
• Retrieves all declared methods with getDeclaredMethods().
• Iterates over constructors and methods, printing their names.
Why this is useful:
• Demonstrates reflection capabilities for runtime class inspection.
• Helps understand how many constructors and methods exist inside
core library classes like ArrayList.
• Useful for debugging, framework design,
and meta-programming tasks
where behavior adapts based on runtime
class analysis.
Output:
- Prints the list of all constructor
signatures of ArrayList.
- Prints the names of all methods (public,
protected, private, and package-private declared within ArrayList).
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: Added How Java Works
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* docs(core-concepts): add overview of Streams, Collections Framework, and Generics
What
- Added a detailed documentation file covering three foundational Java concepts:
1. Streams → declarative, functional data processing with filter/map/reduce and parallelism.
2. Collections Framework → core data structures (List, Set, Map, Queue) and their integration in back-end, front-end, and frameworks.
3. Generics → type-safety, reusability, and readability improvements with generic classes/interfaces.
- Included structured sections:
- Concept explanation
- Practical applications
- Real-world usage across back-end, microservices, UI, and middleware.
- Provided a concise summary that positions these three concepts as the backbone of scalable Java development.
Why
- These three concepts are central to modern Java programming across domains.
- Developers often use them together (e.g., Collections hold data, Streams process it, Generics enforce type safety).
- A unified overview makes it easier to understand how they interconnect and why mastering them is essential for enterprise-grade applications.
Logic
1. **Streams**
- Emphasized functional, declarative style over imperative loops.
- Highlighted back-end data manipulation, parallel computation, and event/log pipelines.
- Showed relevance in high-throughput systems like Spring Boot services or analytics.
2. **Collections Framework**
- Identified as the backbone of Java applications.
- Explained usage in back-end (DB results, caching), front-end/mobile (UI state, adapters), and frameworks (Spring, Hibernate).
- Reinforced importance as building blocks for nearly all Java data-handling code.
3. **Generics**
- Explained compile-time type safety preventing runtime ClassCastException.
- Showed reusability via type-safe repositories, DTOs, and custom utilities.
- Clarified benefits of reduced boilerplate and increased readability.
4. **Real-World Applications**
- Connected Streams, Collections, and Generics into enterprise workflows:
- Back-end data processing (Collections + Streams).
- Microservices aggregation (Streams + Generics for DTOs).
- UI/mobile apps (Collections + Generics for model binding).
- Utility libraries (all three for flexibility and safety).
Real-life applications
- Enterprise back-end: Streams filter/aggregate DB records, Collections cache them, Generics enforce DTO typing.
- Microservices: Streams combine service results, Generics enable reusable interfaces across APIs.
- UI/Mobile apps: Collections model UI data, Streams transform it, Generics prevent runtime casting errors.
- Middleware/utility libraries: Provide type-safe, reusable APIs built on Collections and Generics.
Notes
- ✔ Streams = declarative, functional pipelines for data.
- ✔ Collections = robust, reusable data structures.
- ✔ Generics = compile-time safety + reusable APIs.
- Together, these form the core triad for efficient, scalable, and maintainable Java systems.
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* "chore: add robust .gitattributes + .editorconfig (cross-platform)".
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* docs(paradigms): add detailed explanation of Declarative Programming with Java examples
What
- Documented the concept of **Declarative Programming** vs **Imperative Programming**.
- Highlighted key characteristics:
- Focus on *what* to achieve, not *how* to achieve it.
- High-level abstraction with less boilerplate code.
- Execution strategy left to underlying system (e.g., SQL engine, Streams).
- Provided concrete examples across multiple domains:
- **SQL** → `SELECT * FROM students WHERE marks > 90` (declarative query).
- **Java Streams** → `list.stream().filter(...).map(...).toList()` (functional transformations).
- **HTML/CSS** → structure and styling declaratively described.
- Outlined benefits:
- Conciseness, readability, maintainability.
- Easier parallelization via declarative APIs.
- Added **Java-specific comparison**:
- Imperative sum of even numbers (loops + conditions).
- Declarative sum using Streams API (`filter`, `mapToInt`, `sum`).
Why
- Declarative programming is central to modern Java (Streams, Lambdas, functional style).
- Developers often confuse *control flow* with *business logic*; declarative style separates the two.
- This doc clarifies when and why declarative approaches are preferred in enterprise apps.
Logic
1. **Definition**
- Declarative = specify outcome, not steps.
- Contrasted with imperative = specify exact flow (loops, state changes).
2. **Key Characteristics**
- Abstraction of execution.
- Focus on results instead of algorithmic details.
- Reduction of verbosity and control structures.
3. **Examples**
- SQL → declare query logic without procedural fetch.
- Streams → pipelines describe transformation, not iteration.
- HTML → structure declaration, not rendering process.
4. **Java Focus**
- Streams API embodies declarative patterns (map/filter/reduce).
- Shows improved readability and parallelization compared to traditional loops.
Real-life applications
- **Database queries (SQL)**: write intent-driven queries, let DBMS handle execution plan.
- **Back-end APIs (Java Streams)**: declarative transformations for business rules.
- **UI layer (HTML/CSS)**: declaratively specify layout and style, browsers handle rendering.
- **Parallel data processing**: declarative pipelines allow frameworks to optimize multithreaded execution.
Notes
- Declarative ≠ “no control,” but rather offloading control to libraries/engines.
- Imperative code is sometimes necessary for low-level optimization, but declarative style is preferred for clarity.
- Java’s `Stream.parallel()` demonstrates how declarative style enables automatic performance improvements.
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* docs(streams): add detailed explanation of Primitive Streams (IntStream, LongStream, DoubleStream)
What
- Documented **Primitive Streams in Java** and their role in numerical data processing.
- Covered:
- Definition and difference from object-based streams.
- Specialized types: IntStream, LongStream, DoubleStream.
- Built-in numeric methods (sum, average, min, max, summaryStatistics).
- Benefits: performance optimization, readability, specialized numeric APIs.
- Explained real-world applications across back-end systems, analytics, financial apps, and middleware.
- Provided example using IntStream.rangeClosed(1, 100).sum().
- Added notes on integration with other APIs (boxed conversion, Collectors aggregation).
Why
- Standard `Stream<Integer>` incurs autoboxing/unboxing overhead, reducing efficiency in numeric-heavy workloads.
- Primitive Streams solve this by working directly with primitives (int, long, double).
- They are critical in performance-sensitive domains such as analytics, finance, and real-time monitoring.
- Understanding their role ensures developers can write cleaner, faster, and more maintainable numeric pipelines.
Logic
1. **Specialized Stream Types**
- `IntStream` → operations on int values.
- `LongStream` → operations on long values.
- `DoubleStream` → operations on double values.
2. **Performance Advantage**
- Avoids autoboxing/unboxing (`int ↔ Integer`).
- Reduces memory usage and GC pressure.
- Better suited for large-scale numeric operations.
3. **Built-in Numeric Methods**
- Directly provides `sum()`, `average()`, `min()`, `max()`, and `summaryStatistics()`.
- Eliminates need for manual reduction/aggregation logic.
4. **Integration**
- `boxed()` → converts primitive streams to object streams when APIs require `Stream<T>`.
- Works seamlessly with Collectors for statistical reporting.
Real-world applications
- **Back-End Processing**: Sales aggregation, DB report generation.
- **Financial Systems**: Risk models, moving averages, high-frequency trading data.
- **Analytics/Scientific Computing**: Sensor data, simulations, dashboards.
- **Middleware/Utilities**: Reusable numeric helper APIs, parallel data crunching.
Notes
- Prefer primitive streams for numeric-heavy workloads.
- Use `parallel()` when large datasets benefit from multicore processing.
- Convert to boxed streams only when integration requires object types.
- Leverage `summaryStatistics()` for concise statistical reporting.
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* How Data Is Stored Internally In HashMap
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: Difference Between this and super in
Java.
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* Explain use of this keyword.txt
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* Difference Between This and Super in Java.md
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* Real-World Analogy for this vs super.md
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* Disadvantages of Synchronized in Java
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* Understanding Executors Cached Thread Pool.txt
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* Thread Pooling
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* Differences Between TreeMap and HashMap Detailed.txt
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* TreeMap Insertion Red-Black Balancing.txt
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* Red Black Balancing Tree
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* Plain BST vs Tree Map.md
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* This vs Super
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: Updated normalize text files and keep
LF in the repo. now Windows file support
can clone repo.
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: Updated workflow
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: testing workflows
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: testing workflows for telegram-notify.yml
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: testing workflows for telegram-notify.yml
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: testing workflows for telegram
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: testing workflows for telegram commits
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: testing workflows for telegram commits
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: testing workflows for telegram notify
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: testing workflows for telegram commits
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: testing workflows for telegram commits
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: testing workflows
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: testing workflows
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: testing workflows for telegram commits
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: testing workflows for telegram commits
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: testing workflows for telegram commits
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: testing workflows for telegram commits
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: testing workflows for telegram commits
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: testing workflows for telegram commits
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: testing workflows for telegram commits
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: testing workflows for telegram commits
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: testing workflows for telegram commits
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: Done
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: Done
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: Done
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: Updated Done Final
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: Updated Done Final
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: Updated Animation
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: Updated Animation File
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* feat: Updated Animation File
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
* Update Telegram updates
banner: continuous loop
animation + clickable
link in README.md.
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
---------
Signed-off-by: https://github.com/Someshdiwan <[email protected]>1 parent ecf1c9f commit 79a11ce
File tree
33 files changed
+651
-59
lines changed- .github
- workflows
- Java 8 Crash Course
- Java 8 Streams
- Declarative Programming/src
- Primitive Streams/src
- Java Collectors API/src
- Section 25 Collections Frameworks
- List Interface/ArrayList/src
- Map Interface
- HashMap/src/Hash Map Working/How Data Is Stored Internally In HashMap
- Sorted Map/TreeMap/src/VIP
- Section10Methods/LocalandGlobalVariables/src
- Section11ObjectOrientedProgramming/src
- Section15InnerClasses/src
- Section16StaticFinal/src
- Section19MultiThreading
- DeadLock/src
- Synchronization/src/Test
- ThreadPooling
- ExecutorsFramework/src/TXTFiles
- src
- Tips And Tricks
- site
- assets
33 files changed
+651
-59
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 6 | + | |
8 | 7 | | |
9 | 8 | | |
10 | | - | |
11 | | - | |
| 9 | + | |
| 10 | + | |
12 | 11 | | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | | - | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| 32 | + | |
27 | 33 | | |
28 | | - | |
| 34 | + | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
34 | | - | |
| 40 | + | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
38 | | - | |
| 44 | + | |
| 45 | + | |
39 | 46 | | |
40 | 47 | | |
41 | | - | |
| 48 | + | |
42 | 49 | | |
43 | 50 | | |
44 | | - | |
| 51 | + | |
45 | 52 | | |
46 | 53 | | |
47 | | - | |
48 | | - | |
| 54 | + | |
| 55 | + | |
49 | 56 | | |
50 | 57 | | |
51 | | - | |
52 | | - | |
53 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
54 | 61 | | |
55 | 62 | | |
56 | 63 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
78 | 67 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
85 | 71 | | |
86 | 72 | | |
87 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
88 | 77 | | |
89 | | - | |
| 78 | + | |
90 | 79 | | |
91 | | - | |
| 80 | + | |
92 | 81 | | |
93 | 82 | | |
94 | 83 | | |
95 | 84 | | |
96 | 85 | | |
97 | 86 | | |
| 87 | + | |
98 | 88 | | |
99 | 89 | | |
100 | | - | |
| 90 | + | |
101 | 91 | | |
102 | 92 | | |
103 | 93 | | |
| 94 | + | |
104 | 95 | | |
105 | 96 | | |
106 | 97 | | |
| |||
109 | 100 | | |
110 | 101 | | |
111 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
112 | 107 | | |
113 | 108 | | |
114 | 109 | | |
115 | 110 | | |
116 | 111 | | |
117 | 112 | | |
118 | | - | |
| 113 | + | |
119 | 114 | | |
120 | 115 | | |
121 | 116 | | |
122 | 117 | | |
123 | 118 | | |
124 | | - | |
| 119 | + | |
125 | 120 | | |
0 commit comments