Continuing my journey in Java, I’ve recently explored some key object-oriented concepts that play a major role in building flexible and extensible applications. Here are the topics I covered: Polymorphism and how it enables one interface with multiple implementations (compile-time and runtime) Method Overriding and the use of toString() for meaningful object representation Abstract Classes and how they help in achieving abstraction by defining a blueprint for derived classes These concepts provided deeper insight into how Java supports dynamic behavior, clean design, and code reusability. Gradually strengthening my understanding of core OOP principles and their practical applications. #Java #OOP #Programming #LearningJourney #SoftwareDevelopment #CDAC
Java OOP Concepts: Polymorphism, Method Overriding, Abstract Classes
More Relevant Posts
-
Continuing my progress in Java, I’ve recently explored some important object-oriented and structural concepts that deepen my understanding of how real-world applications are designed. Here are the topics I covered: Containment (Has-A relationship) and how objects can be composed within other classes Method Overloading for achieving compile-time polymorphism Static Import to simplify code by directly accessing static members Inheritance for creating hierarchical relationships and promoting code reusability Packages for organizing classes and maintaining scalable project structure These concepts helped me better understand how to design modular, reusable, and maintainable Java applications. Step by step, moving closer to mastering core Java and applying these concepts in real-world scenarios. #Java #OOP #Programming #LearningJourney #SoftwareDevelopment #CDAC
To view or add a comment, sign in
-
-
Day 49-What I Learned In a Day (JAVA) Today, I focused on understanding the execution flow of static elements in Java. 🔹 Learned about: • Static variables and how they are shared across objects • Static methods and how they can be accessed without object creation • Static initializer (single-line) • Static initializer (multi-line) This helped me clearly understand how Java handles memory and execution at the class level before objects are created. Building strong fundamentals step by step! #Java #Programming #LearningJourney #OOP #TechSkills
To view or add a comment, sign in
-
-
Multithreading in Java finally clicked for me when I stopped memorizing it… and started visualizing it. 🧠 Here’s the simplest way to understand it: Imagine your application is doing only ONE task at a time. ➡️ Slow ➡️ Blocking ➡️ Poor performance Now introduce multithreading 👇 Multiple tasks run simultaneously: ✔ One thread handles API requests ✔ One processes data ✔ One writes logs Result? Faster and more efficient applications 🚀 But here’s what I learned the hard way: Multithreading is powerful… but dangerous if not handled properly. Common issues I faced: Race conditions Deadlocks Unexpected bugs What helped me: ✔ Proper synchronization ✔ Understanding thread lifecycle ✔ Using ExecutorService instead of manual threads Lesson: Multithreading is not just about speed — it’s about control and correctness. 💬 Have you faced any tricky bugs with multithreading? #Java #Multithreading #BackendDevelopment #SoftwareEngineering #Coding
To view or add a comment, sign in
-
Day 11 of Learning Java Streams Today I worked on a simple but insightful problem: Extract all digits from a string and calculate their sum. I first approached it in a more step-by-step (brute force style) using streams: Converted characters to objects Filtered digits Converted each digit to String Then to Integer Finally used reduce() to compute the sum While it worked, I realized it involved unnecessary conversions and overhead. Then I explored a more optimized approach: Stayed within IntStream Filtered digits directly Used Character.getNumericValue() Leveraged built-in sum() This made the solution cleaner, faster, and more efficient. Key Learning: Choosing the right stream type (IntStream vs Stream<T>) can significantly simplify logic and improve performance. Small improvements like avoiding unnecessary transformations can make code more readable and efficient. #Java #JavaStreams #CodingJourney #LearningInPublic #BackendDevelopment #ProblemSolving #100DaysOfCode
To view or add a comment, sign in
-
-
Day 38 of Learning Java Today, I explored how a class executes inside the JVM (Java Virtual Machine). Understanding this lifecycle really helped me see what happens behind the scenes when we run a Java program. 🔹 Class Loading • The JVM loads the class into memory • It brings the ".class" file into the system 🔹 Linking Phase • Verification → Checks bytecode for errors • Preparation → Allocates memory for static variables (default values like 0) • Resolution → Replaces symbolic references with actual memory references 🔹 Initialization • Static variables get their actual assigned values • Static blocks are executed 🔹 Execution • Methods start running and the program logic is executed 🔹 Destruction • Objects are destroyed and memory is cleaned up by the Garbage Collector Static variables first get default values during preparation, and later their actual values during initialization. Thanks to my mentor Ashim Prem Mahto for the clear explanations and for always clearing my doubts. #Java #JVM #LearningJourney #Programming #SoftwareDevelopment #BackendDevelopment #CodingLife #JavaDeveloper #TechLearning #StudentLife
To view or add a comment, sign in
-
-
Day 46 – Understanding Method Overloading in Java ☕ Today I focused on revising the concept of Method Overloading in Java and understanding how it works internally. Topics covered: 🔹 What is method overloading 🔹 How the compiler selects the appropriate method 🔹 Steps involved in method resolution 🔹 Why it is called compile-time polymorphism 🔹 Why it is referred to as early binding Understanding how the compiler decides which method to invoke based on parameters helped me gain deeper clarity on Java’s execution process. Strengthening my core OOP concepts step by step 🚀 #Day46 #JavaJourney #OOP #MethodOverloading #CoreJava #Consistency
To view or add a comment, sign in
-
🚀 Mastering Java Through LeetCode 🧠 Day 32 Today I solved an Easy-level Tree problem that strengthened my understanding of Recursion + Depth Calculation — a fundamental concept for tree-based problems 📌 LeetCode Problem Solved: Q.104. Maximum Depth of Binary Tree 💭 Problem Summary: Given a binary tree, the task is to find the maximum depth — i.e., the number of nodes along the longest path from root to leaf. 🧠 Approach (Optimal): Instead of iterating level by level, I used a clean recursive approach: ✔️ If node is null → return 0 ✔️ Recursively calculate left subtree depth ✔️ Recursively calculate right subtree depth ✔️ Return 1 + max(left, right) ⚡ Key Learning: Recursion makes tree problems much simpler when you think in terms of “what should each function return for a node?” Complexity: Time: O(n) Space: O(h) Takeaway: Tree problems become easier once you master recursion and start recognizing patterns. Consistency is the key — showing up every day #Day32 #LeetCode #Java #DSA #CodingJourney #Recursion #BinaryTree #100DaysOfCode #SoftwareEngineering
To view or add a comment, sign in
-
-
Day 48 – Understanding Constructors in Java ☕ Today I revised the concept of Constructors in Java and how they work internally. Topics covered: 🔹 What is a constructor and when it is called 🔹 Types of constructors 🔹 Constructor execution flow 🔹 Local constructor chaining 🔹 Working of this() 🔹 Role and usage of the this keyword Understanding how constructors initialize objects and how chaining works helped me gain better clarity on object creation and memory handling in Java. Strengthening my core OOP concepts step by step 🚀 #Day48 #JavaJourney #OOP #Constructors #CoreJava #Consistency
To view or add a comment, sign in
-
-
Day 55-What I Learned In a Day (JAVA) Today, I learned how to create and use constructors in Java. 🔹 A constructor is a special method used to initialize an object when it is created. 🔹 Constructors are non-static by default, meaning they work with objects and help assign values to instance variables. 🔹 They are automatically executed when an object is created, making object initialization simple and efficient. 🔹 This reduces the need for setting values manually after object creation. Understanding constructors helped me see how Java initializes objects in a structured and efficient way. #Java #OOP #Constructors #LearningJourney #Programming #TechSkills
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