Another small but interesting concept while studying interfaces was marker interfaces. Unlike normal interfaces, marker interfaces do not define any methods. Instead, they act as a signal to the Java runtime that a class has a certain capability. Things that became clear : • marker interfaces are empty interfaces without methods • they are used to "mark" a class so that the JVM treats it differently • they provide additional behaviour without forcing method implementation • some well-known examples in Java include Cloneable and Serializable • they are mainly used by libraries or the runtime to enable certain features A simple structure looks like this : interface IDemo { } class Test implements IDemo { } Here the interface itself does not contain any methods, but implementing it can allow a class to receive special handling in certain situations. Understanding marker interfaces showed another way Java uses interfaces beyond just defining behaviour. #java #oop #programming #learning #dsajourney
Lakhyadeep Sen’s Post
More Relevant Posts
-
Day 44-What I Learned In a Day(JAVA) Today I revised pattern programming in Java to strengthen my core logic and understanding of loops. What I practiced: • Star patterns • Number patterns • Pyramid patterns • Inverted patterns • Nested loop logic Pattern programming helped me improve: • Loop control (for/while) • Logical thinking • Understanding of rows & columns Every pattern I solve makes my logic stronger step by step. Consistency is the key #Java #CodingJourney #PatternProgramming #Learning #StudentDeveloper
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
-
-
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
-
-
Understanding the difference between shallow copy and deep copy in Java really changed how I think about object handling and memory. A shallow copy duplicates the reference — meaning changes in one object can unexpectedly affect another. On the other hand, a deep copy creates an entirely independent object with its own memory allocation. This concept might seem small at first, but it becomes critical when working with complex data structures, real-world applications, and avoiding unintended side effects. Key takeaway: Always be clear whether you're copying data or just references. #Java #Programming #Learning #DSA #SoftwareDevelopment
To view or add a comment, sign in
-
-
Refactoring for Clarity: Array Manipulation in Java 👨💻 I’ve just finished a practical exercise on array manipulation. While the goal was simple (summing two arrays), I used it as an opportunity to apply improvements. - Method decomposition: Separated concerns into specialized methods (Read, Calculate, Display). - Input validation: Built a robust loop to handle invalid inputs and prevent crashes. - Data Formatting: Used printf to create a clear, readable results table. Small improvements in logic and organization make a huge difference in software quality. #Java #Algorithms #CleanCode #Backend #LearningToCode
To view or add a comment, sign in
-
-
Same data. Same values. Still stored twice? 🤯 That’s when I realized — Java doesn’t care about values… It cares about objects 🧠 Two objects may look identical, but for Java — they can be completely different ⚠️ And this is where many developers get confused. 🚨 Stop just watching tutorials… Real growth = Practice + Consistency 💯 🔥 Java Daily Practice ☕️ 👉 Join & start today 🔗 https://lnkd.in/gfhqgjGd 🚀 Here’s a quick challenge 👇 💬 What do you think the output will be? #Java #JavaDeveloper #HashSet #Collections #OOP #Programming #Debugging #BackendDeveloper #Coding #TechLearning #DeveloperTips #LinkedInIndia
To view or add a comment, sign in
-
Today I Learned – Object Orientation Rules & Main Method in Java While learning Java, I explored how object relationships work and how a program starts execution. --> HAS-A Relationship Represents composition or aggregation, where one class contains another class object as a member. Example: Car HAS-A Engine --> DOES-A Relationship Represents behavior implementation, where a class performs behavior defined by another type using interfaces or abstract classes. Example: Bird DOES-A Flyable --> Main Method in Java The entry point of a Java application where the Java Virtual Machine starts program execution. Syntax: public static void main(String[] args) Breakdown: • public → Accessible everywhere • static → Can be executed without creating an object • void → Does not return a value • main → Method recognized by JVM to start execution • String[] args → Used to receive command-line arguments #JavaDeveloper #ObjectOrientedProgramming #OOP #JavaLearning #BackendDevelopment #CodingJourney #100DaysOfCode #LearningInPublic #DeveloperCommunity #FutureDeveloper #TechCareer
To view or add a comment, sign in
-
-
💻 Practicing Binary to Decimal Conversion using Java Today I worked on converting a binary number into its decimal equivalent using logic and iteration. 🔍 Key Learnings: Understanding how binary digits map to powers of 2 Strengthening loop and mathematical logic Improving problem-solving skills step by step Instead of just memorizing, I focused on understanding the logic deeply and practicing with different inputs. 📌 Example: Binary: 1010 → Decimal: 10 Consistency + Practice = Progress 🚀 #Java #DSA #CodingJourney #Programming #100DaysOfCode #LearnToCode #ProblemSolving #DeveloperJourney #CodingPractice #TechSkills
To view or add a comment, sign in
-
-
#Day_13 of My Java Learning Journey – Writing Functions in Java Today I practiced how to create functions (methods) in Java, and I built a simple program to check whether a number is Even or Odd. 🔥 What I learned today: ✔ How to create a boolean function ✔ How to use if-else conditions inside a method ✔ How to return true/false ✔ How to call a method inside the main() function ✔ How to print the result in the console 🧩 Example I worked on: I created a method IfEven(int a) that: Prints whether the number is Even or Odd Returns a boolean value (true for even, false for odd) This helped me understand functions more clearly and how they improve code structure and reusability. #Java #LearningJourney #100DaysOfCode #Coding #Developer #JavaBeginners #OOP #CodeNewbie
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