🟣 OOP · Lesson 16
OOP Concepts
OOP Concepts
What is OOP?
Object-Oriented Programming (OOP) organizes code around objects — things with data (fields) and actions (methods). Java is a fully object-oriented language.
The Four Pillars
| Pillar | Meaning |
|---|---|
| Encapsulation | bundle data + methods; hide internals |
| Inheritance | a class reuses another's code |
| Polymorphism | one method name, many forms |
| Abstraction | show essentials, hide complexity |
Summary
- OOP = code organized around objects (data + methods).
- Four pillars: encapsulation, inheritance, polymorphism, abstraction.
OOP क्या है?
Object-Oriented Programming (OOP) code को objects के इर्द-गिर्द organize करता है — ऐसी चीज़ें जिनमें data (fields) और actions (methods) हों। Java पूरी तरह object-oriented है।
चार स्तंभ
| स्तंभ | मतलब |
|---|---|
| Encapsulation | data + methods bundle; internals छुपाना |
| Inheritance | एक class दूसरी का code reuse करे |
| Polymorphism | एक method नाम, कई रूप |
| Abstraction | ज़रूरी दिखाना, जटिलता छुपाना |
सारांश
- OOP = objects (data + methods) पर आधारित code।
- चार स्तंभ: encapsulation, inheritance, polymorphism, abstraction।