Started learning Object Oriented Programming (OOP) in Java. Until now most programs were written as step-by-step logic. OOP changes the perspective — instead of thinking only in terms of functions, we start thinking in terms of objects and their behaviour. Things that became clear : - an object represents something from the real world - every object has state (data) and behaviour (actions) - a class acts like a blueprint used to create objects - programs become easier to organize when related data and behaviour are grouped together - java mainly builds programs around four core ideas • encapsulation • inheritance • polymorphism • abstraction One realization from the start is that OOP is less about syntax and more about how you structure and model a problem. Still early in this section, but understanding this shift in thinking already makes the upcoming concepts easier to approach. Continuing with classes and objects. #java #oop #programming #learning #dsajourney
Lakhyadeep Sen’s Post
More Relevant Posts
-
Day 12 of Learning Java Understanding the 4 Pillars of OOP (Object-Oriented Programming Today I learned about the four main pillars of Object-Oriented Programming (OOP) in Java. These concepts help us write clean, secure, and reusable code. The four pillars are: 1️⃣ Encapsulation Encapsulation means binding data and methods together in one class. It also helps to protect data by using private variables and public methods. Example idea: A capsule contains medicine inside. Similarly, a class keeps data and methods together. 2️⃣ Inheritance Inheritance means one class can use properties and methods of another class. It helps in code reuse. Example: A Car class can inherit features from a Vehicle class. 3️⃣ Polymorphism Polymorphism means one thing, many forms. The same method can behave differently in different situations. Example: A method named add() can add two numbers or three numbers. 4️⃣ Abstraction Abstraction means showing only important details and hiding complex implementation. Example: When we drive a car, we only use the steering wheel and pedals. We do not need to know how the engine works internally. In Simple Words OOP Pillars help us: ✔ Organize code ✔ Reuse code ✔ Improve security ✔ Reduce complexity #Java #OOP #ObjectOrientedProgramming #LearningInPublic #CodingJourney #SoftwareDevelopment
To view or add a comment, sign in
-
-
Another key idea in object oriented programming is abstraction. Abstraction focuses on exposing only the essential behaviour of an object while hiding the internal implementation details. In Java, one way to achieve abstraction is through abstract classes. Things that became clear : • an abstract class cannot be instantiated directly • abstract classes can contain both abstract methods and normal methods • abstract methods declare behaviour but do not provide implementation • child classes must provide implementation for the abstract methods • this allows a common structure while letting subclasses define specific behaviour A simple example helps illustrate the idea : abstract class Bird { abstract void fly(); } class Sparrow extends Bird { void fly() { System.out.println("Sparrow flying"); } } Here the Bird class defines the idea of flying, but the actual behaviour is implemented by the specific type of bird. This approach helps separate what an object does from how it actually performs the task. #java #oop #programming #learning #dsajourney
To view or add a comment, sign in
-
🚀 Learning Java OOP Through Projects To strengthen my understanding of Object-Oriented Programming in Java, I built several mini projects where I focused on applying the core OOP principles in practice. Through these projects, I explored and implemented the following key concepts: 🔹 Classes & Objects 🔹 Encapsulation 🔹 Inheritance 🔹 Polymorphism 🔹 Abstraction 🔹 Collections (ArrayList) Projects I built while learning these concepts: 🔹 Parking Lot System https://lnkd.in/gYX7x_qN 🔹 Quiz Game https://lnkd.in/gseXZdmt 🔹 Employee Salary Calculator https://lnkd.in/gb_yrQiQ 🔹 Memory Matching Game ( Swing) https://lnkd.in/gqxftHhb Building these projects helped me move beyond theory and understand how OOP concepts are applied in real programs. #Java #OOP #JavaProjects #Programming #LearningByDoing
To view or add a comment, sign in
-
🚀 Day 11/45 – Introduction to OOP in Java On Day 11 of my Java learning journey, I started learning Object-Oriented Programming (OOP), which is one of the most important concepts in Java. OOP helps in designing programs using real-world objects, making code more structured and reusable. 📚 What I Learned Today Today I explored: ✔ What classes and objects are ✔ How to create and use objects in Java ✔ Understanding real-world mapping of objects to code ✔ Introduction to the four pillars of OOP – Encapsulation, Inheritance, Polymorphism, and Abstraction 💻 Practice Work To apply my learning, I implemented: • A simple class to store person details • A basic car example using class and object 🎯 Key Takeaway OOP is a powerful programming approach that helps in writing clean, modular, and reusable code. Understanding classes and objects is the first step toward mastering advanced Java concepts. Excited to dive deeper into OOP concepts. #Java #Programming #LearningInPublic #CodingJourney #SoftwareDevelopment #OOP
To view or add a comment, sign in
-
🚀 Learning OOP Concept: Polymorphism in Java Today, I explored one of the core concepts of Object-Oriented Programming — Polymorphism. 🔹 What is Polymorphism? Polymorphism means “one object, many forms.” It allows methods to perform different tasks based on the object that is calling them. 🔹 Types of Polymorphism: 1. Compile-time (Method Overloading) Same method name, different parameters. 2. Runtime (Method Overriding) Same method name, same parameters, but different implementation in child classes. 🔹 Why is it important? ✔ Improves code flexibility ✔ Enhances reusability ✔ Supports dynamic behavior in applications 🔹 Simple Example: A method "draw()" can behave differently for shapes like Circle, Square, and Triangle. 💡 This concept plays a major role in writing scalable and maintainable applications. Excited to keep learning and building more with Java! ☕ #Java #OOP #Polymorphism #Programming #LearningJourney #SoftwareDevelopment
To view or add a comment, sign in
-
-
Completed the object oriented programming section in Java. At the beginning it felt like a collection of separate topics, but while going through the concepts step by step it became clearer how everything connects. Things that stood out while learning this section : - classes and objects form the basic structure of object oriented programs - variables, constructors, and access modifiers help control how objects are created and how data is accessed - encapsulation protects internal data and allows controlled interaction - inheritance allows classes to reuse behaviour instead of rewriting logic - polymorphism makes programs more flexible by allowing the same operation to behave in different ways - abstraction helps focus on what an object does rather than how it does it One noticeable shift was moving from thinking about programs as a sequence of steps to thinking about them as groups of interacting objects. The concepts are simple individually, but together they create a much more organized way of designing programs. #java #oop #programming #learning #dsajourney
To view or add a comment, sign in
-
Abstraction in Java The last OOP concept — Abstraction - using abstract classes. Here’s what I learned: 🔹 Abstract Methods These methods contain only the method signature (no body) and must be implemented by the child class. 🔹 Abstract Class Rules ✔ If a class contains abstract methods, it must be declared as abstract ✔ If a class extends an abstract class, it must either: • Implement all abstract methods, or • Be declared as abstract 🔹 Key Characteristics ✔ Abstract classes cannot be instantiated (no object creation) ✔ They can contain both abstract and non-abstract methods ✔ They behave like normal classes except for object creation 🔹 Constructor Behavior Even though we cannot create objects of an abstract class, its constructor is still executed when a child class object is created (via super()). This helped me clearly understand how abstraction provides structure and enforces implementation, making code more organized and scalable. TAP Academy #Java #OOP #Abstraction #Programming #SoftwareDevelopment #LearningJourney
To view or add a comment, sign in
-
-
Understanding Strings in Java – Simplified! Strings are one of the most fundamental concepts in programming, yet they carry powerful behavior behind the scenes. This infographic breaks down everything you need to know in a clean and visual way: 🔹 What is a String? A collection of characters enclosed within double quotes. 🔹 Types of Strings ✔️ Immutable – Cannot be changed once created ✔️ Mutable – Can be modified anytime (using StringBuilder / StringBuffer) 🔹 Ways to Create Strings ✅ Using new keyword ✅ Without new (String Constant Pool) ✅ Using character arrays 🔹 Real-time JVM Use Cases 📌 Memory optimization with String Constant Pool 📌 Reference vs Value comparison scenarios 🔹 String Comparison Techniques 🔸 == → Reference comparison 🔸 equals() → Value comparison 🔸 equalsIgnoreCase() → Case-insensitive comparison 🔸 compareTo() → Lexicographical comparison 💡 Mastering strings helps you write efficient, optimized, and bug-free Java programs! #Java #Programming #OOP #JavaDeveloper #Coding #ComputerScience #Learning #TechEducation #Developers #StringHandling TAP Academy
To view or add a comment, sign in
-
-
🚀 New Java OOP Videos Released! – Compile-Time Polymorphism Series Excited to share the next set of sessions in our Java OOP Programming journey 👇 📌 New Sessions: • Session 56 – Types of Polymorphism in Java • Session 57 – Compile-Time Polymorphism Introduction • Session 58 – Method Overloading Rules (Part 1) • Session 59 – Method Overloading Rules (Part 2) • Session 60 – Method Overloading Rules (Part 3) • Session 61 – Why Compile-Time Polymorphism? 🎯 Focus: Strong fundamentals + real clarity on method overloading & design concepts 🔗 Playlist: https://shorturl.at/VEtae 💡 Learning by Doing with Praveen Kandhan 👍 Your continuous support means a lot 🙌 #Java #OOP #Polymorphism #Programming #LearningByDoing #Coding
To view or add a comment, sign in
-
-
💡 What is Object-Oriented Programming (OOP)? Object-Oriented Programming (OOP) is a programming concept that organizes code using objects and classes. It helps developers write clean, reusable, and maintainable code. 🔹 Main OOP Concepts 1️⃣ Encapsulation Keeping data and methods together inside a class and restricting direct access. 2️⃣ Inheritance A class can inherit properties and methods from another class to reuse code. 3️⃣ Polymorphism The same method can perform different actions depending on the object. 4️⃣ Abstraction Hiding complex implementation details and showing only the necessary features. 📌 Why OOP is Important? ✔ Reusable code ✔ Easy to maintain ✔ Better structure for large applications ✔ Improves code readability Many modern programming languages support OOP such as Java, Python, C++, and PHP. If you're learning software development, understanding OOP is a must-have skill 🚀 #Programming #OOP #SoftwareDevelopment #Coding #Learning #ITCareer
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development