Skip to content

Commit 9b53b86

Browse files
committed
Updating Content File. Final Update Soon
Signed-off-by: Someshdiwan <[email protected]>
1 parent 8a2db0b commit 9b53b86

File tree

1 file changed

+33
-27
lines changed

1 file changed

+33
-27
lines changed

site/content.md

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,15 @@
118118

119119
---
120120

121-
# Section 5: Operator & Expression (with Casting Focus)
121+
# Section 5: Operator & Expression
122122

123123
### 📘 Combined Summary:
124124

125-
This section introduces the fundamental concepts of **type casting** in Java, with a special focus on **upcasting** and **downcasting**, crucial for **polymorphism**, **object-oriented design**, and **runtime behavior** in inheritance.
125+
This section introduces the fundamental concepts of **type casting** in Java, with a special focus on **upcasting** and
126+
**downcasting**, crucial for **polymorphism**, **object-oriented design**, and **runtime behavior** in inheritance.
126127

127-
While the section title suggests a general overview of *operators and expressions*, the content is centered around understanding how **object references** are cast in **inheritance hierarchies**.
128+
While the section title suggests a general overview of *operators and expressions*, the content is centered around
129+
understanding how **object references** are cast in **inheritance hierarchies**.
128130

129131
You’ll explore:
130132
- The concept of upcasting (parent reference → child object)
@@ -134,28 +136,30 @@ You’ll explore:
134136

135137
---
136138

139+
```
137140
### 🔍 Core Topics Breakdown
138141
139-
| Concept | Description |
140-
|---------------------|-----------------------------------------------------------------------------|
141-
| **Upcasting** | Assigning a child class object to a parent class reference. Safe and implicit. |
142-
| **Downcasting** | Converting a parent class reference back to a child class. Requires explicit cast and is potentially unsafe unless checked. |
143-
| **Polymorphism** | Enabled through upcasting, where overridden methods in the child class are invoked through the parent class reference. |
144-
| **ClassCastException** | Can occur if downcasting is done without checking the object type using `instanceof`. |
142+
| Concept | Description |
143+
|-----------------------|-----------------------------------------------------------------------------------------------------------------------------|
144+
| Upcasting | Assigning a child class object to a parent class reference. Safe and implicit. |
145+
| Downcasting | Converting a parent class reference back to a child class. Requires explicit cast and is potentially unsafe unless checked. |
146+
| Polymorphism | Enabled through upcasting, where overridden methods in the child class are invoked through the parent class reference. |
147+
| ClassCastException | Can occur if downcasting is done without checking the object type using `instanceof`. |
145148
146-
---
149+
```
147150

151+
```
148152
### 📷 Visual Learning Aids
149153
150-
| File Name | Description |
151-
|----------------------------------|-----------------------------------------|
152-
| `Upcasting.png` | Shows safe assignment of child → parent |
153-
| `Upcasting-Vs-Downcasting.png` | Comparison chart of both mechanisms |
154-
| `Upcasting-Vs-Downcasting1.png` | Detailed flow with arrows and hierarchy |
155-
| `upcasting.txt` | Text explanation with examples |
156-
| `upcasting vs downcasting.txt` | Combined notes on both concepts |
154+
| File Name | Description |
155+
|--------------------------------|-----------------------------------------|
156+
| Upcasting.png | Shows safe assignment of child → parent |
157+
| Upcasting-Vs-Downcasting.png | Comparison chart of both mechanisms |
158+
| Upcasting-Vs-Downcasting1.png | Detailed flow with arrows and hierarchy |
159+
| upcasting.txt | Text explanation with examples |
160+
| upcasting vs downcasting.txt | Combined notes on both concepts |
157161
158-
---
162+
```
159163

160164
### 🔍 Real Code Insight
161165

@@ -195,7 +199,8 @@ public class CastingDemo {
195199

196200
### 📘 Combined Summary:
197201

198-
This section not only explores **upcasting and downcasting**, but also dives into **bitwise operators**, **expression evaluations**, **input/output operations**, and **method parameter handling**.
202+
This section not only explores **upcasting and downcasting**, but also dives into **bitwise operators**,
203+
**expression evaluations**, **input/output operations**, and **method parameter handling**.
199204

200205
Together, these files provide a **comprehensive foundation** for how Java handles:
201206
- Operator precedence
@@ -214,18 +219,19 @@ You’ll find hands-on examples demonstrating:
214219

215220
---
216221

222+
```
217223
### 🔍 Concept Map
218224
219225
| Topic | Covered In |
220-
|--------------------------------|------------------------------------------------|
221-
| **Bitwise Operations** | `Bitwise1.java``Bitwise7.java`, `And.java`, `And1.java`, `And2.java` |
222-
| **Casting & Type Conversion** | `Upcasting.java`, `Downcasting.java`, `WideNarrow.java`, `UpDownCasting.java` |
223-
| **Expressions in Java** | `Expression.java`, `Expression2.java`, `Expression3.java` |
224-
| **Keyboard Input** | `ReadingFromKeyBoard.java` |
225-
| **Functions & Parameters** | `ParametersArguments.java` |
226-
| **Recursion** | `OneToNPrint.java` |
226+
|--------------------------------|---------------------------------------------------------------------------------|
227+
| **Bitwise Operations** | Bitwise1.java → Bitwise7.java, And.java, And1.java, And2.java |
228+
| **Casting & Type Conversion** | Upcasting.java, Downcasting.java, WideNarrow.java, UpDownCasting.java |
229+
| **Expressions in Java** | Expression.java, Expression2.java, Expression3.java |
230+
| **Keyboard Input** | ReadingFromKeyBoard.java |
231+
| **Functions & Parameters** | ParametersArguments.java |
232+
| **Recursion** | OneToNPrint.java |
227233
228-
---
234+
```
229235

230236
### 🔬 Code Patterns in Use
231237

0 commit comments

Comments
 (0)