Hello Connections 👋 Today I practiced a Java concept called Anonymous Class. An Anonymous Class is a class without a name that is created and instantiated at the same time. It is mainly used when we want to override a method for one-time use without creating a separate class. In the example above: • I created a Parent class with a method "message()" • Then I used an Anonymous Class to override that method • When the object calls "obj.message()", the overridden method from the anonymous class is executed 💡 This helps developers write quick implementations and reduce unnecessary class creation. Learning and sharing small concepts every day to strengthen my Java programming fundamentals 🚀 #Java #JavaProgramming #AnonymousClass #Coding #LearningJourney
Java Anonymous Class: One-Time Method Override
More Relevant Posts
-
Today I created a new video on my YouTube channel where I explained the Java Hello World program, basic structure, and how to take user input using Scanner. As a beginner, understanding these fundamentals is very important to build a strong base in programming. In this video, I covered: ✔ Java basic structure ✔ Hello World program execution ✔ Use of main() method ✔ Taking input using Scanner I am trying to improve my teaching and content creation skills step by step 💻 Your feedback and support will mean a lot 🙌 #Java #Programming #LearnJava #Coding #SoftwareDevelopment #Students #BCA #Beginner #Tech #Developer #JavaDeveloper #LearningJourney
Java First Program | Hello World + User Input (Scanner) Explained
https://www.youtube.com/
To view or add a comment, sign in
-
🚀 Day 27 of Learning Java Today I built a small Course Registration System that brings together multiple Java concepts: Interfaces & Functional Programming: I created an EligibilityChecker interface and used Java’s built‑in functional interfaces like Predicate, Function, and Consumer to handle pass/fail checks, grade assignment, and eligibility logic. Object-Oriented Design: Defined a Student class with encapsulated fields, getters/setters, and methods to calculate total marks and average. Exception Handling: Added validation to ensure marks are between 0 and 100, throwing and catching exceptions when invalid input is entered. Streams of Logic: Used Consumer to process each student object, calculate results, and display details in a clean format. Scanner Input & Arrays: Allowed dynamic input for multiple students, storing marks in arrays and looping through them for calculations. ✨ What I loved about this exercise is how functional interfaces make the code more modular and expressive. Instead of writing long conditional blocks, I could plug in small reusable functions (Predicate, Function, Consumer) to handle different responsibilities. This project gave me a deeper appreciation of how OOP and functional programming can complement each other in Java. #Day27 #JavaLearning #FunctionalProgramming #OOP #ExceptionHandling #CodeJourney #LearningInPublic #JavaDeveloper #ProgrammingConcepts #LinkedInLearning
To view or add a comment, sign in
-
🚀 Day 8/45 – Taking User Input in Java using Scanner On Day 8 of my Java learning journey, I learned how to make programs interactive by taking input from the user. Until now, I was using fixed values in my programs, but today I explored how to accept dynamic input using the Scanner class. 📚 What I Learned Today Today I learned: ✔ How to use the Scanner class from java.util package ✔ Taking input using methods like nextInt(), next(), and nextLine() ✔ Writing programs that respond based on user input 💻 Practice Work To apply my learning, I implemented: • Addition of two numbers using user input • Even or odd number checker using input • Simple interest calculator using user-provided values 🎯 Key Takeaway Taking input from users makes programs dynamic and interactive. This is an important step toward building real-world applications. Practicing daily is helping me improve both my coding and problem-solving skills. #Java #Programming #LearningInPublic #software #CodingJourney #SoftwareDevelopment #Consistency
To view or add a comment, sign in
-
🚀 Day 9/45 – Understanding Methods in Java On Day 9 of my Java learning journey, I explored the concept of Methods (Functions), which are essential for writing reusable and organized code. Methods help reduce repetition and make programs easier to understand and maintain. 📚 What I Learned Today Today I learned: ✔ What methods are and why they are used ✔ How to define and call methods ✔ Passing parameters to methods ✔ Returning values from methods 💻 Practice Work To apply my learning, I implemented: • A method to print a message • A method to perform addition • A method to check whether a number is even or odd 🎯 Key Takeaway Methods are a powerful feature in programming that promote code reusability and modular design. Understanding methods is an important step toward mastering advanced concepts like object-oriented programming. #Java #Programming #LearningInPublic #javadeveloper #CodingJourney #SoftwareDevelopment #Consistency
To view or add a comment, sign in
-
Day 8 of My Java Learning Journey ☕💻 Today I continued strengthening my core Java fundamentals and focused on understanding Method Overloading and basic Inheritance concepts. What I practiced today: • Implemented method overloading by creating an Area Calculator for Square, Rectangle, and Circle • Learned how Java decides which method to call at compile time (Compile-Time Polymorphism) • Practiced taking user input using the Scanner class • Explored the basics of Inheritance using parent and child classes • Understood how child classes can access methods from parent classes One key takeaway today: Writing small programs helps reinforce concepts much better than just reading theory. Next on the learning roadmap: • Method Overriding • Runtime Polymorphism • Deeper understanding of Object-Oriented Programming in Java Step by step, building stronger backend fundamentals. #Java #LearningInPublic #Programming #BackendDevelopment #100DaysOfCode #JavaDeveloper
To view or add a comment, sign in
-
Boost Your Java Skills with This Quick Tutorial! Are you learning Java or looking to sharpen your programming skills? Check out my latest video on Label While loop and infinite while loop! In this video, you will learn: ✅ The basics of Label While loop and infinite while loop ✅ How to write clean and efficient code ✅ Real-world examples and practical use cases ✅ Tips to avoid common mistakes Whether you are a beginner, a student, or an aspiring Java developer, this tutorial will make easy to understand and implement. 📺 Watch here: https://lnkd.in/gzhu7-JQ 💡 Don’t forget to like, share, and comment your thoughts! Your feedback helps me create more useful tutorials. #Java #JavaProgramming #Coding #LearnJava #Programming #SoftwareDevelopment #TechTips #JavaForBeginners
Label While Loop & Infinite While Loop in Java with Examples
https://www.youtube.com/
To view or add a comment, sign in
-
📘 Day 23 of My Java Learning Journey Today I explored one of the core concepts of Object-Oriented Programming, Inheritance in Java 💡 🔹 Inheritance represents an “is-a relationship” 🔹 It allows one class to acquire properties and behaviors of another 🔹 It helps in code reusability and reduces code duplication 📚 I covered the following types of inheritance: • Single Inheritance • Multilevel Inheritance • Hierarchical Inheritance ⚠️ I learned about Multiple Inheritance and the Diamond Problem, but since Java doesn’t support it using classes, it is achieved using interfaces. 👉 I’ve decided to skip Multiple and Hybrid Inheritance for now and will revisit them after completing Interfaces for better clarity. 💻 I also implemented example programs with proper code and output to strengthen my understanding. Step by step, building a strong foundation in Java 💪 #JavaDeveloper #CoreJava #ObjectOrientedProgramming #JavaLearning #CodeNewbie #DeveloperJourney #LearnToCode #ProgrammingLife #FutureDeveloper
To view or add a comment, sign in
-
Java started as version 1.02—slow, limited, but loved for its simple syntax, object-oriented design, memory management, and “write once, run anywhere” promise. Early programmers struggled with bugs and slow performance, but their dedication paid off. Today, Java is faster, more powerful, and much easier to use. If you’re learning Java now, you’re lucky to start with this modern, sleek version! #Java #Programming #Coding #SoftwareDevelopment #LearnJava #TechJourney
To view or add a comment, sign in
-
Today I strengthened my understanding of how Java programs actually execute 🚀☕ Here’s what I learned step by step: ✔ The file name must match the public class name 📄 ✔ The main() method can be inside any class, not only the public class 🔍 ✔ Only one public class is allowed in one ".java" file ⚠️ ✔ Protected members outside the package are accessible through inheritance — 🔹 Non-static → accessed using child class object 🔹 Static → accessed using child class name or parent class name inside child class 👨👦✨ ✔ The JVM first loads the class that contains main(), then loads other required classes when needed 🧠 Understanding these core execution rules is helping me build stronger clarity in Java inheritance and access modifiers 💻📚 #Java #Programming #LearningJourney #OOP #JavaDeveloper #BackendDevelopment 🚀
To view or add a comment, sign in
-
Day 35 - What I Learned Today (JAVA) Today, I spent time practicing pattern programming in Java, and it was both challenging and fun. I worked on different types of triangle patterns such as: 🔹 Upper triangle 🔹 Lower triangle 🔹 Forward half triangle 🔹 Backward half triangle Deep Dive into Learning: While solving these patterns, I understood how important nested loops are in controlling rows and columns. I also learned how to manage spaces and symbols to create proper alignment and shapes. At first, some patterns were confusing, but once I broke them into: 🔹 spaces 🔹 stars (or symbols) the logic became much clearer. Creative Part: Instead of always using *, I tried something different: 🔹 Used emojis to print patterns 🔹 Printed my name ELAKKIYA using pattern logic This made learning more interesting and helped me think beyond basic patterns. Pattern programming is a great way to strengthen fundamentals and improve problem-solving skills. Step by step, turning confusion into clarity 💪 Practiced 👇 #Java #Coding #PatternProgramming #LearningJourney #ProblemSolving #JavaDeveloper
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