Day 5 of My Java Learning Journey Today I learned about Methods, Method Overloading, and Method Overriding in Java. >>Methods: A method is a block of code that performs a specific task. It helps in code reusability and makes the program more organized and readable. Basic structure of a method: *Access modifier *Return type *Method name *Parameters *Method body >>Method Overloading: Method overloading means having multiple methods with the same name but different parameters (different number or type of arguments) in the same class. >>Method Overriding: Method overriding happens when a child class provides its own implementation of a method that is already defined in the parent class. #Java #OOPS #MethodOverloading #MethodOverriding #LearningInPublic
More Relevant Posts
-
Day 9 – Java Learning Journey Today I continued strengthening my Java fundamentals, focusing on method overriding and important rules in inheritance. Key concepts I explored: • Method Overriding Rules in Java The child class method must have the same method signature as the parent class method. The return type must be the same or covariant (a subclass of the parent return type). The method cannot be static, because static methods belong to the class rather than the object. • Covariant Return Types Java allows a child class method to return a more specific type than the parent class method, making inheritance more flexible. • Static vs Instance Methods I also learned why static methods cannot be overridden and are instead method hidden, which behaves differently from runtime polymorphism. Step by step, continuing to build a stronger foundation in Core Java and OOP concepts. 🚀 #Java #CoreJava #OOP #MethodOverriding #Programming #SoftwareDevelopment #LearningJourney
To view or add a comment, sign in
-
🚀 Java Learning Journey — Day 6 Today I continued strengthening my Java fundamentals and explored an important concept: Static vs Instance behavior in Java. 🔹 Learned the difference between instance methods and static methods 🔹 Understood why static methods belong to the class, not the object 🔹 Explored static variables and how a single copy is shared across all objects 🔹 Studied how Java manages memory using Stack, Heap, and Method Area One key realization today: Static members are created when the class is loaded into the JVM, not when objects are created. This explains why all objects share the same static variable. Small concepts like these build the foundation for understanding how Java actually works internally. Looking forward to continuing tomorrow with Static Blocks and class loading behavior. #Java #LearningJourney #BackendDevelopment #Programming #SoftwareDevelopment #100DaysOfCode
To view or add a comment, sign in
-
🚀 Strengthening my Java fundamentals step by step! Today’s learning was all about Exception Handling in Java, and I explored some powerful concepts: 🔹 Understanding exceptions and stack trace flow 🔹 How JVM handles exceptions internally 🔹 Using try-catch to prevent application crashes 🔹 Concept of exception propagation (method-to-method flow) 💡 Advanced concepts I learned: ✔️ Rethrowing exceptions using throw ✔️ Giving warnings using throws ✔️ Ensuring execution using finally ✔️ Ducking an exception (passing responsibility to caller) 🎯 Key takeaway: 👉 “A well-handled exception ensures smooth program execution without abrupt termination.” The real-world analogies like ATM systems and method calling made the concepts much easier to understand! 📈 Step by step, I can clearly see my improvement in problem-solving and Java fundamentals. #TapAcademy #Java #Programming #ExceptionHandling #CodingJourney #LearningEveryday #FullStackDeveloper
To view or add a comment, sign in
-
-
Day 28 -What I Learned in a Day(JAVA) Today I started learning Looping Statements in Java. Loops are used to execute a block of code repeatedly until a certain condition becomes false. They help reduce code repetition and make programs more efficient. In Java, there are mainly three types of loops: • while loop • do-while loop • for loop Today I focused on the while loop. 🔹 What is a While Loop? A while loop executes a block of code repeatedly as long as the condition is true. The condition is checked before the loop executes, so if the condition is false initially, the loop will not run. Syntax of While Loop: initialization; while(condition) { // statements increment / decrement; } What I Practiced Today: ✔ Practiced 3 basic while loop programs ✔ Built a calculator program using while loop and switch statement ✔ Learned how loops control program flow and reduce repetitive code Every day I’m taking small steps to improve my Java programming skills and strengthen my understanding of core concepts. Practiced 👇 #Java #JavaLearning #Programming #CodingJourney #Loops #WhileLoop
To view or add a comment, sign in
-
🚀 Day – Java Learning Update ⏳ 🎯 Understanding Switch Case in Java Today, I learned about the Switch Case statement in Java, which is used to execute different blocks of code based on the value of a variable or expression. It is mainly used when we have multiple conditions to check for a single variable, making the code more readable compared to many if-else statements. 🔹 What is Switch Case? The switch statement allows a variable to be tested against multiple possible values called cases. ✔ Each case represents a possible value ✔ break stops execution after a case runs ✔ default runs if no case matches 🔹 Syntax of Switch Case switch(expression) { case value1: // code block break; case value2: // code block break; case value3: // code block break; default: // default code block } 🧑💻 Task Practiced: Traffic Signal Program I implemented a simple program using switch case to represent a traffic signal. #Java #CoreJava #JavaFullStack #SwitchCase #Programming #SoftwareDeveloper #LearningJourney 10000 Coders Meghana M
To view or add a comment, sign in
-
-
#Day15 of learning Java from Aditya Tandon CoderArmy Today I learned static & final in Java ➤ static → belongs to the class, shared by all objects ➤ Static methods can access only static members ➤ Static blocks run once when class loads ➤ final → cannot be changed Notes: https://lnkd.in/gUHSdaFN
To view or add a comment, sign in
-
-
🚀 Exploring a New Feature in Java 25! Today I came across an interesting update in Java 25. Traditionally, every Java program required writing: public static void main(String[] args) But with the newer version, Java has simplified this! Now we can simply write: void main() { System.out.println("Hello World"); } And the program runs successfully 🎉 This makes Java more beginner-friendly and reduces boilerplate code, especially for simple programs and learning purposes. It’s great to see Java evolving to improve developer experience while maintaining its powerful ecosystem. Have you tried this new feature yet? 💻✨ #Java #Java25 #Programming #SoftwareDevelopment #Learning
To view or add a comment, sign in
-
-
Day 19 of Learning Java Continuing my Java journey! On Day 19, I learned about: ✅ Nested Classes in Java ✅ Static Nested Classes ✅ Inner Classes ✅ Local Classes ✅ Anonymous Classes 🔹 Nested Classes A class defined inside another class is called a nested class. It helps in better code organization and encapsulation. 🔹 Static Nested Class Declared using static keyword. Example: class Outer { static class Inner { } } It can be accessed without creating an object of the outer class. 🔹 Inner Class A non-static class inside another class. Example: class Outer { class Inner { } } It requires an object of the outer class. 🔹 Local Class A class defined inside a method. Example: void greet() { class Local { } } 🔹 Anonymous Class A class without a name, usually used for quick implementation of interfaces or abstract classes. special thanks to Aditya Tandon and Rohit Negi sir
To view or add a comment, sign in
-
-
🚀 Day’s Learning – Java Interface Evolution Today I explored how interfaces became more powerful in Java. Earlier in Java 7, interfaces could only contain abstract methods. But starting from Java 8, interfaces became much more flexible: ✅ Default Methods – allow method implementation inside interfaces. ✅ Static Methods – utility methods that belong to the interface itself. Then Java 9 introduced another improvement: ✅ Private Methods – used internally within interfaces to avoid repeating common code between default and static methods. 📌 Quick Evolution Java 7 → Abstract methods only Java 8 → Default + Static methods Java 9 → Private methods Small features like these show how Java continuously evolves to make code more reusable and maintainable. Excited to keep learning more about modern Java development. 💻 #Java #Java8 #Java9 #Programming
To view or add a comment, sign in
-
-
Today I explained the concept of Inner Classes in Java, which is an important part of Object-Oriented Programming (OOP). In this session, we discussed how Composition (HAS-A Relationship) works and how Inner Classes help improve the structure and design of Java applications. 📌 Key Concepts Covered: Composition in Java HAS-A Relationship Inner Class Concept Advantages of Inner Classes Modularity Abstraction Security Shareability Reusability We also explored the types of Inner Classes: ✔ Static Nested Class ✔ Regular Inner Class ✔ Method Local Inner Class ✔ Anonymous Inner Class Understanding these concepts helps developers write better structured and more maintainable Java applications. If you are learning Core Java or Object-Oriented Programming, this topic is very important.
Java Inner Classes Explained | Static Nested Class, Composition & Types of Inner Class Java Tutorial
https://www.youtube.com/
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