Day 15/30 Explored Method Overloading in Java as part of strengthening my Core Java fundamentals. Method overloading enables compile-time polymorphism, allowing multiple methods with the same name but different parameter lists (type, number, or order). This improves code readability, reusability, and flexibility while keeping method semantics consistent. Key takeaways: ✔ Same method name, different signatures ✔ Achieved without changing return type alone ✔ Resolved at compile time → better performance than runtime polymorphism in certain scenarios Built sample implementations using: 🔹 Different parameter counts 🔹 Different data types 🔹 Type promotion cases Focusing on mastering OOP concepts step by step as part of my journey toward becoming a Software Development Engineer. #Java #OOP #MethodOverloading #CompileTimePolymorphism #SDEJourney #CodingInPublic #CoreJava
Mastering Java Method Overloading for Compile Time Polymorphism
More Relevant Posts
-
🔱 Java Mastery & Logic Lab (SDE Prep) A curated repository of my daily journey through Data Structures, Algorithms, and Core Java. This isn't just code; it's a documentation of my problem-solving evolution—where Intelligence meets Logic. (HCL GUVI) Key Highlights in this Link: >Core Java Foundations: OOPS concepts, Exception Handling, and Collections. >Logic Building: 100+ solved problems on Strings, Arrays, and Recursion. >Project Modules: Small-scale implementations of AI patterns and JVM architecture insights. Link to the snippets coding, which I am practicing while studying:- https://lnkd.in/gSCNwN5q #JavaDeveloper #SDEPrep #DataStructures #Algorithms #CleanCode #SoftwareEngineering #BackendDeveloper #TechTalent #JavaFullStack #ArtOfLogic #VisualThinking #TheArchitectsMind #ArtistOnLinkedIn #PoeticLogic #MindfulCreativity
To view or add a comment, sign in
-
Day 4 — Java Stream Practice Today’s focus was on solving a common problem using Java Streams: finding the most frequent element in a collection. Given a list of words, the task was to identify the element that appears the highest number of times. Approach: Grouped elements using Collectors.groupingBy() Counted occurrences with Collectors.counting() Streamed over the map entries Used max() with Map.Entry.comparingByValue() to find the highest frequency Extracted the result using map(Map.Entry::getKey) This exercise reinforced how Streams can simplify data processing by replacing traditional loops with a more declarative approach. Key learning: Breaking down a problem into smaller transformations makes the solution more readable and maintainable. Looking forward to exploring more real-world use cases of Java Streams. #Day4 #Java #JavaStreams #Coding #ProblemSolving #BackendDevelopment #LearnInPublic
To view or add a comment, sign in
-
-
🚀Day 21 – Understanding Variable Scope & Memory Management in Java Today I focused on concepts that play an important role in how Java programs manage variables and memory during execution. Instead of just writing programs, I explored how variables behave in different scopes and how Java automatically manages unused objects. 📚 Concepts Covered ✔ Variable Scopes • Difference between Instance Variables and Local Variables • How instance variables belong to an object and exist throughout the object's lifecycle • How local variables exist only inside methods or blocks ✔ Garbage Collection & Finalize • Understanding how Java automatically removes unused objects from heap memory • Learning how Garbage Collector helps optimize memory usage • Exploring the concept of the finalize() method and object cleanup 💡 Key Learning Understanding variable scope and garbage collection helps developers write cleaner, memory-efficient, and more reliable programs. These core concepts are essential for mastering Java, Object-Oriented Programming, and real-world software development. I’m focusing on deep understanding of concepts instead of rushing through topics, because strong fundamentals build strong developers. #Java #CoreJava #JavaProgramming #OOP #Programming #SoftwareDevelopment #CodingJourney #LearningInPublic #DeveloperJourney #TechLearning #BackendDevelopment #FutureDeveloper #BuildInPublic #Consistency
To view or add a comment, sign in
-
-
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 5 of My DSA Journey (Java) Today’s problem: Subarray Sums Divisible by K 📌 Problem Summary: Given an integer array and a value k, find the number of subarrays whose sum is divisible by k. 💡 Key Learning: The brute-force approach would be too slow, so I explored an optimized solution using: Prefix Sum HashMap for storing remainder frequencies 🔍 Core Insight: If two prefix sums have the same remainder when divided by k, the subarray between them is divisible by k. ⚙️ Approach: Maintain a running sum Compute remainder: (sum % k + k) % k (to handle negatives) Use a HashMap to count frequencies of remainders Add to count when remainder repeats 🧠 What I Improved Today: Better understanding of prefix sum patterns Handling negative modulo cases Writing clean and efficient Java code ✅ Time Complexity: O(n) ✅ Space Complexity: O(k) 📷 I’ve attached my handwritten notes + implementation for better clarity Consistency is key 🔁 — learning something new every day! #DSA #Java #CodingJourney #LeetCode #ProblemSolving #100DaysOfCode
To view or add a comment, sign in
-
Java Streams Series – Day 7 Today I explored an efficient approach to check whether a string is a palindrome using Java Streams. Instead of using traditional loops or reversing the string, this approach applies a functional style to compare characters from both ends, progressing toward the center. By iterating through only half of the string, it maintains optimal performance while keeping the implementation concise and readable. This reinforces how Java Streams can help write clean, declarative, and efficient code for common problems. #Java #JavaStreams #CleanCode #FunctionalProgramming #100DaysOfCode
To view or add a comment, sign in
-
-
Day 25 Today Learning Journey in Advanced Java Today I explored several powerful concepts in Advanced Java that are essential for writing clean, efficient, and scalable applications. Here’s what I learned: 🔹 Comparator Interface Learned how to customize sorting logic using Comparator, including sorting based on different fields and using lambda expressions for cleaner code. 🔹 Multithreading Understood how threads work in Java, how to create them using Runnable, and why synchronization is important to avoid race conditions. 🔹 Collections Framework Deepened my understanding of core collection types like ArrayList, HashSet, and LinkedHashSet, and how they differ in terms of ordering and performance. 🔹 Stream API Explored functional programming concepts in Java using: filter() – for conditional data selection map() – for transforming data reduce() – for aggregating results The Stream API really changed the way I think about data processing in Java — more readable, concise, and powerful. #Java #AdvancedJava #Multithreading #Collections #StreamAPI #LearningJourney #SoftwareDevelopment
To view or add a comment, sign in
-
Heap vs Stack in Java (Explained Simply 🚀) Most beginners confuse this. Top developers master this. STACK (⚡ Fast & Small) Stores: Method calls + local variables Memory: LIFO (Last In, First Out) Speed: Very fast Scope: Thread-specific Auto cleanup when method ends 👉 Think: Temporary workspace HEAP (📦 Big & Shared) Stores: Objects & instance variables Memory: Dynamic allocation Speed: Slower than stack Scope: Shared across threads Managed by Garbage Collector 👉 Think: Storage warehouse 1-Line Difference: 👉 Stack = Execution memory 👉 Heap = Storage memory Real Example: int x = 10; // Stack User u = new User(); // Reference → Stack, Object → Heap Golden Rule 🧠 If you understand Heap vs Stack → You understand memory, performance, and debugging. Follow for more 🚀 #Java #JVM #BackendDevelopment #Programming #JavaDeveloper #Coding #TechEducation
To view or add a comment, sign in
-
-
🚀 Mastering Core Java | Day 19 📘 Topic: Vector vs Stack – Key Differences Today’s learning focused on understanding the differences between two legacy classes in Java: Vector and Stack, and their relevance in modern development. 🔹 Vector Class Synchronized dynamic array Ensures thread safety (but slower performance) Supports random access (index-based) 📌 Use when thread-safe operations are required 🔹 Stack Class Follows LIFO (Last In First Out) principle Extends Vector Operations: push(), pop(), peek() ❌ Considered legacy 🔹 Modern Recommendation Prefer ArrayList instead of Vector Prefer Deque / ArrayDeque instead of Stack Deque<Integer> stack = new ArrayDeque<>(); stack.push(10); stack.pop(); 💡 Key Takeaway: While Vector and Stack are important for understanding Java fundamentals, modern applications prefer faster and more efficient alternatives. Grateful to my mentor Vaibhav Barde sir for guiding me toward writing better and more optimized Java code. #CoreJava #JavaCollections #JavaDeveloper #LearningJourney #DataStructures #SoftwareDevelopment #Day19 🚀
To view or add a comment, sign in
-
-
🚀 Day 18 – Understanding Core Java OOP Foundations Today’s focus was on strengthening my understanding of some fundamental Object-Oriented Programming concepts in Java that are widely used in real-world applications. 📚 Concepts Learned ✔ this keyword – Understanding how it refers to the current object and helps differentiate instance variables from parameters. ✔ static keyword – Learning how class-level variables and methods are shared across all objects. ✔ Constructors – Using constructors to initialize objects automatically during object creation. ✔ Code Blocks – Understanding how Java executes initialization blocks. 💻 To reinforce these concepts, I implemented Java programs demonstrating constructors, instance variables, and static variables, helping me understand how objects are created and how memory is managed in Java. Every day I aim to focus on understanding concepts deeply rather than just completing topics, because strong fundamentals are the key to becoming a better developer. #100DaysOfCode #Java #CoreJava #OOP #ObjectOrientedProgramming #JavaDeveloper #SoftwareDevelopment #Programming #CodingJourney #DeveloperLife #BackendDevelopmen #TechLearning
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