🚀 Day 16 of Core Java Learning – Non-Static Methods & Object Creation Today, I focused on strengthening my understanding of non-static (instance) methods and objects in Java by implementing a real-world Employee class example. 📘 What I Learned & Practiced: Creating objects using the new keyword Understanding how non-static methods belong to objects, not the class How each object maintains its own instance data Accessing instance variables through objects Calling one non-static method from another Modeling real-world scenarios using classes and objects 🔍 Key Insight: Static vs Non-Static Methods Static Methods: Belong to the class Can be called without creating an object Access only static data directly Same behavior across all objects Non-Static Methods: Belong to individual objects (instances) Require object creation to be called Can access both instance and static data Behavior depends on object-specific data This hands-on practice helped me clearly understand how object-oriented principles work in real applications, especially how data and behavior are tied to individual objects. Excited to continue building a strong foundation in Java! 💻🔥 #Java #CoreJava #ObjectOrientedProgramming #LearningJourney #JavaDeveloper #ProgrammingBasics #100DaysOfCode Meghana M
Java Object Creation & Non-Static Methods Explained
More Relevant Posts
-
--- 🔍 Understanding how data is passed to methods is a core Java concept. ✅ Pass by Value Java passes a copy of primitive values. Changes inside the method do not affect the original variable. ✅ Objects in Java Java still uses pass by value, but the value is a reference. Modifying the object through this reference does affect the original object. 📌 Key takeaway: Java is always pass by value — the difference lies in what value is passed (primitive value vs object reference). 💡 Visual learning makes complex concepts easier. Keep learning, keep coding! #Java #CoreJava #OOP #JavaConcepts #Programming #Learning #Developers #Coding #TAPACADAMY ---
To view or add a comment, sign in
-
-
📘 Day 5 | Core Java Series Many beginners rush into coding without understanding data types. This visual breaks down Java data types in a simple way 👇 Primitive vs Non-Primitive — once this is clear, everything else becomes easier. 📌 Save this if you’re learning Java 💬 Let me know if this helped #Java #CoreJava #LearningJourney #ProgrammingBasics
To view or add a comment, sign in
-
-
🚀 Day 4 | Core Java Learning Journey 📘 Topic: Data Types, Variables & Operators in Java Continuing my Java learning journey, today I explored data types, variables, wrapper classes, autoboxing/unboxing, and operators—the fundamental building blocks of Java programs. 🔑 Key Concepts Covered Today: 🔹 Data Types in Java • Primitive Types: byte, short, int, long, float, double, char, boolean • Non-Primitive Types: String, Arrays, Classes, Interfaces 🔹 Wrapper Classes & Autoboxing/Unboxing • Each primitive has a wrapper class (e.g., Integer for int, Double for double) • Autoboxing: primitive → wrapper object automatically • Unboxing: wrapper object → primitive automatically 🔹 Variables in Java Variables are containers for data. Types of Variables: • Local: Inside methods; accessible only there • Instance: Each object has its own copy • Static/Class: Shared across all objects • Final/Constant: Value cannot change; constants usually static final • Global: Simulated using static variables 🔹 Operators in Java (overview only) Operators perform operations on variables/values: • Arithmetic: +, -, *, /, %, ++, -- • Relational: ==, !=, >, <, >=, <= • Logical: &&, ||, ! • Bitwise: &, |, ^, ~, <<, >>, >>> • Assignment: =, +=, -=, etc. • Ternary: condition ? trueValue : falseValue • instanceof: checks object type 📌 Why this matters: Understanding data types, variables, and operators is the foundation of Java. Strong grip here makes OOP, collections, and advanced concepts much easier. Special thanks to my mentor Vaibhav Barde for guiding me through these concepts. #Java #CoreJava #Variables #DataTypes #WrapperClasses #Autoboxing #Unboxing #Operators #JavaProgramming #FinalVariables #Constants #LearningJourney #BackendDevelopment #DailyLearning
To view or add a comment, sign in
-
-
🚀 Core Java – Day 08 Learning Update 🚀 📘 Today’s session was a continuation of Java Data Types, and it gave me a deeper understanding of how data is actually represented and handled internally in Java. 🔹 Character Data Type (char) Learned how characters are stored using binary representation Understood the relationship between number of symbols and code length (2ⁿ concept) Explored ASCII vs UNICODE Why Java follows UNICODE (16-bit, 2 bytes) to support global languages 🌍 🔹 Boolean Data Type (boolean) Used to store true/false or yes/no values Learned that its size is JVM-dependent, making Java flexible across platforms 🔹 Type Casting in Java ✅ Implicit Type Casting (Widening) Automatic conversion from smaller to larger data types No loss of precision ✔️ ⚠️ Explicit Type Casting (Narrowing) Manual conversion from larger to smaller data types Possibility of data loss / precision loss 🧠 These concepts really helped me understand how Java manages memory, data conversion, and platform independence at a deeper level. 📈 Slowly building a strong foundation in Core Java, one concept at a time. TAP Academy Trainer:Sharath R #CoreJava #JavaLearning #Day08 #ProgrammingBasics #DataTypes #TypeCasting #Unicode #ASCII #JavaDeveloper #LearningJourney #Consistency 💪
To view or add a comment, sign in
-
-
🚀 Java Series | Day 7/100 📌 Understanding Variables: Scope & Memory Today’s Java learning helped me clearly understand how variables behave based on where they are declared and how memory is allocated. This concept removed a lot of confusion around scope, lifetime, and data sharing in Java. 🔹 Why Variables Matter Variables control how data flows in a program. Choosing the right type of variable improves: ✔ Performance ✔ Readability ✔ Maintainability 🔹 Scope & Lifetime in Java 🔸 Local Variables Exist only during method execution. Memory is released once the method ends. 🔸 Instance Variables Live as long as the object exists and represent the object’s state. 🔸 Static Variables Belong to the class and are shared across all objects, helping reduce memory usage. ✨ Key Takeaway Knowing when a variable is created and destroyed is as important as knowing where it is declared. 📈 Building strong Java fundamentals today for scalable applications tomorrow. #Java #CoreJava #JavaLearning #100DaysOfJava #Programming #SoftwareDevelopment #LearningJourney #Developer # Meghana M # 10000 Coders
To view or add a comment, sign in
-
🚀 Daily Learning Update – Day 6 🚀 🧠 Java Practice: Methods (Functions) 🔹 What is a Method? A block of code that performs a specific task May or may not return a value Must be part of a class Improves code reusability 🔹 Method Syntax access_modifier return_type method_name(parameters) 🔹 Parameters Formal Parameters → defined in method Actual Parameters → passed during method call 🔹 Types of Methods 1️⃣ Predefined Methods Built-in methods from Java libraries Directly usable (e.g., Math, System) 2️⃣ User-Defined Methods Created by programmers for custom logic Uses stack frame for execution Stack frame is removed after execution 🔹 Parameter Passing in Java Primitives → Pass by Value Objects → Reference copy (points to same memory) 🔹 Method Overloading Same method name Different number or type of parameters 🔹 Instance (Non-Static) Methods Accessor (Getter) → reads data Mutator (Setter) → modifies data 📌 Key Takeaway: Clean method design = reusable, readable, and maintainable code. #Java #DSA #Programming #LearningEveryDay #SoftwareDevelopment #CodeReusability
To view or add a comment, sign in
-
-
🌱 Learning Java Collection Framework – Practical Understanding 🌱 Today’s session was all about practical implementation, and honestly it helped me clear many small but important doubts about the Java Collection Framework. We worked on converting Arrays to Collections and Collections back to Arrays, which looks simple but is very important in real coding scenarios. 🔹 Converted Array ➝ List using Arrays.asList() and learned that this list is fixed-size (we cannot add or remove elements). 🔹 To overcome this limitation, I used ArrayList and understood why we prefer it when modification is required. 🔹 Converted Array ➝ Set using HashSet to remove duplicate values automatically — a very useful concept in real-world data handling. 🔹 Practiced Collection ➝ Array conversion using toArray() and understood how type matters while converting. 📌 What I personally learned today: ✔ Why Collection Framework is more flexible than arrays ✔ When to use List and when Set is a better choice ✔ How small implementation details can cause errors if not understood properly Special thanks to Prasoon Bidua Sir for explaining the concepts in such a clear and practical way 🙏 Today’s practice made me realize that understanding concepts + hands-on coding is the real way to improve. Still learning, still improving 💪 #Java #CollectionFramework #ArrayToList #ListToArray #JavaDeveloper #LearningByDoing #CodingPractice #FullStackJava
To view or add a comment, sign in
-
-
📌 Static Keyword in Core Java – Quick Overview In Java, the static keyword is used to define members that belong to the class itself, not to individual objects. 🔹 Static Variables Shared among all objects of the class. Only one copy is created in memory. 🔹 Static Methods Can be called using the class name and don’t require object creation. 🔹 Static Blocks Executed once when the class is loaded. Mostly used for initialization. 🔹 Why use static? ✔ Memory efficient ✔ Faster access ✔ Common data shared across objects Understanding static helps in writing optimized and well-structured Java code. #Java #CoreJava #StaticKeyword #OOP #Programming #JavaDeveloper #Coding #Learning #TapAcademy TAP Academy Sharath R
To view or add a comment, sign in
-
-
🚀 Serialization & Deserialization in Java – Learning by Doing While learning Java File Handling, I spent time understanding Serialization and Deserialization, two important concepts used for object persistence and data transfer in real-world Java applications. 🔹 What is Serialization? Serialization is the process of converting a Java object into a byte stream, so it can be: -> Stored in a file -> Sent over a network -> Cached for later use In Java, this is achieved by: -> Implementing the Serializable interface -> Using ObjectOutputStream to write the object Once serialized, the object’s state is preserved even after the program ends. 🔹 What is Deserialization? Deserialization is the reverse process—converting the byte stream back into a Java object. -> This allows the application to: -> Restore object state -> Reuse previously stored data -> Maintain continuity across JVM executions It is done using ObjectInputStream. 🧠 Important Concepts I Learned 📌 Serializable Interface -> It is a marker interface (no methods) -> It tells the JVM that the class is eligible for serialization 📌 Object Streams -> ObjectOutputStream → writes objects to a file -> ObjectInputStream → reads objects from a file 📌 Type Casting -> While deserializing, the returned object must be type-cast back to the original class 📌 Persistence Across JVM -> Serialized objects can be restored even after restarting the program 📌 Exception Handling -> IOException → issues during file operations -> ClassNotFoundException → class mismatch during deserialization 📌 Resource Management -> Streams must be closed properly to avoid memory leaks -> (Can be improved further using try-with-resources) 🌍 Where Serialization is Used in Real Applications -> Saving user session data -> Transferring objects in distributed systems -> Caching objects for performance optimization -> Storing application state 🎯 Takeaway Practicing this example helped me understand how Java preserves object state, how the JVM handles object streams, and why serialization plays a crucial role in backend systems. Special thanks to Prasoon Bidua for amazing guidance Github link:- https://lnkd.in/g44DvBmX #Java #CoreJava #Serialization #Deserialization #JavaIO #FileHandling #BackendDevelopment #LearningJourney #BCA #StudentDeveloper
To view or add a comment, sign in
-
-
📘 Java Learning – Types of Variables (Part 2: Static & Local Variables) While strengthening my Core Java fundamentals, I gained clarity on how static and local variables differ in purpose, scope, and memory behavior. Here are my key learnings 👇 ▶️ Static Variables • Used when a variable’s value does not change from object to object • Declared at class level using the static keyword • Only one shared copy exists for the entire class 📌 Any change to a static variable affects all objects. ✅ Memory & Lifecycle • Created during class loading • Destroyed during class unloading • Stored in the Method Area • Scope = class scope ✅ Access • Can be accessed using class name (recommended) • Can also be accessed using object reference • Accessible from both static and instance areas ✅ Initialization • JVM provides default values automatically ▶️ Local Variables • Declared inside methods, constructors, or blocks • Used for temporary requirements • Stored in stack memory ✅ Scope & Lifecycle • Created when the block starts execution • Destroyed when the block ends • Scope limited to the declaring block ✅ Initialization Rules • JVM does not provide default values • Must be initialized before use 📌 Best practice: initialize at the time of declaration. ✅ Modifiers • Only final is allowed • Any other modifier causes a compile-time error ⭐ What I Gained from This • Clear distinction between shared and temporary data • Better understanding of scope and memory management • Strong foundation for writing efficient Java code Understanding static and local variables is essential for building optimized and predictable Java applications. #Java #CoreJava #StaticVariables #LocalVariables #JavaInternals #JavaFullStack #LearningJourney #BackendDeveloper
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