🚀 100 Days of Java | Day 2 Understanding My First Java Program Day 2 was all about slowing down and truly understanding what happens inside a simple Java program. Today, I focused on breaking down my first Java program line by line instead of just running it and moving on. I explored how the structure of a Java program is organized and why each part exists. Key concepts I learned today: 🔹 Class declaration – how every Java program starts with a class 🔹 Access modifiers – understanding the role of public 🔹 Main method – why public static void main(String[] args) is the entry point 🔹 Keywords like class, static, void and their purpose 🔹 Command-line arguments and where they fit 🔹 System.out.println() – how output is printed to the console 🔹 Difference between class, method, object reference, and output statement Instead of memorizing syntax, I’m focusing on why things are written the way they are. This clarity makes the language feel less intimidating and more logical. Small steps, strong basics. 📘 Day 2 completed. Consistency over comfort. One day at a time 💪 10000 Coders #100DaysOfJava #JavaJourney #LearningJava #CoreJava #ProgrammingBasics #DailyLearning #SoftwareDeveloper #10000Coders
Java Basics: Understanding Class Declaration and Access Modifiers
More Relevant Posts
-
Day 4 | Full Stack Development with Java Today I explored one of the most important concepts in Java — the Main Method and how execution actually begins inside a program. What I learned today: Control of Execution In Java, execution always starts from the main() method. Even if multiple functions exist, none will run unless the main method gives control. The JVM looks for a specific signature to start execution. Why public static void main(String[] args)? public → Makes the method visible to JVM. static → Allows execution without creating an object. void → No return value. String[] args → Stores command-line inputs as an array. Command Line Arguments (args) args collects data passed during program execution. It acts like a dynamic array that stores runtime inputs. Helps make programs flexible and dynamic. Object Creation Reminder Objects are created using the new keyword. Steps include declaration, instantiation, and initialization. Key Takeaway Understanding how the main method controls execution helped me realize how Java programs actually start running behind the scenes. Strong fundamentals are making advanced backend concepts easier to understand. #Day4 #Java #MainMethod #FullStackDevelopment #LearningInPublic #SoftwareDevelopment
To view or add a comment, sign in
-
-
🚀 Mastering Date & Time in Java (java.time Package) Handling date, time, and duration in Java used to be confusing. But with the java.time API (Java 8+)`, everything became simple, clean, and powerful 💡 Here are the most useful classes every Java developer should know 👇 📌 LocalDate → Works with dates only (yyyy-MM-dd) 📌 LocalTime → Works with time only (HH:mm:ss) 📌 LocalDateTime → Date + Time together 📌 ZonedDateTime → Date & Time with timezone 📌 Period → Difference between dates (Years, Months, Days) 📌 Duration → Difference between times (Hours, Minutes, Seconds) 📌 DateTimeFormatter → Format & parse date/time ✅ Why use java.time? ✔️ Immutable (Thread-Safe) ✔️ Easy to read & maintain ✔️ Supports Time Zones ✔️ No more old Date & Calendar confusion 📈 Real-Time Use Cases 🔹 Attendance / Entry-Exit System 🔹 Booking Applications 🔹 Billing Duration Calculation 🔹 Log Timestamping 🔹 System Design (LLD/HLD) Learning Date & Time APIs properly makes your code: ✨ Cleaner ✨ Bug-Free ✨ Production-Ready If you’re learning Java, don’t skip this topic 💪 #Java #Programming #Backend #SystemDesign #JavaDeveloper #Coding #DSA #Learning
To view or add a comment, sign in
-
-
🚀 Day 10 of My 90 Days Java Full Stack Challenge Today I focused deeply on Exception Handling in Java — from fundamentals to internal concepts. 🟢 LEVEL 1 – Core Understanding ✔ Divide Two Numbers (Handled ArithmeticException) ✔ Array Index Access (ArrayIndexOutOfBoundsException) ✔ Null Pointer Problem (NullPointerException) ✔ Number Format Handling (NumberFormatException + input validation) Concepts practiced: • try-catch • Multiple catch blocks • Runtime exceptions • Graceful error handling 🟡 LEVEL 2 – Deep Understanding ✔ Return inside try & finally (finally overriding behavior) ✔ Primitive vs Object return difference ✔ Nested try-catch blocks ✔ Stack unwinding & exception propagation ✔ Catch hierarchy (Child → Parent order) Today’s key learning: Exception handling is not just about catching errors — it’s about understanding how JVM works internally and writing clean, production-ready code. Slowly moving from “Java learner” to “Backend-ready mindset” 🚀 Consistency over motivation. Day 10/90 ✅ #Day10 #90DaysChallenge #Java #BackendDevelopment #ExceptionHandling #SpringBoot #FullStackDeveloper #LearningInPublic #SoftwareEngineering
To view or add a comment, sign in
-
🚀 Day 14 – Java Full Stack Journey | Pass by Value vs Reference Behavior in Java Today’s focus was on a very important concept in Java: 👉 Pass by Value (Primitive Types) 👉 Reference Behavior with Objects Understanding this clearly is essential for mastering Object-Oriented Programming. 🔹 1️⃣ Pass by Value (Primitives) int a = 1000; int b = a; b = 2000; ✔ A copy of the value is passed ✔ a and b are completely independent ✔ Changing b does NOT affect a Final Values: a → 1000 b → 2000 This is called Pass by Value because only the value is copied. 🔹 2️⃣ Reference Behavior (Objects) Car a = new Car(); Car b = a; ✔ Only one object is created in Heap ✔ a and b both point to the same object ✔ Multiple references → Single object If we modify using b: b.name = "KIA"; Then accessing with a.name will also show "KIA". Why? Because both references point to the same memory location. 🔹 Memory Understanding Primitive variables → Stored in Stack → Independent copies Objects → Stored in Heap References → Stored in Stack → Point to Heap object One object can have multiple references. Any modification through one reference reflects for all. 💡 Key Learning • Primitives → Value copy • Objects → Reference copy • One object → Many references possible • Understanding memory makes debugging easier Today’s learning strengthened my clarity in Object-Oriented Programming fundamentals. Day 14 Complete ✔ #Day14 #Java #CoreJava #PassByValue #PassByReference #OOPS #HeapAndStack #JavaDeveloper #FullStackJourney #LearningInPublic TAP Academy
To view or add a comment, sign in
-
-
🚀 Day 3 – Java Programming | Platform Independence Good afternoon everyone. Today’s session focused on one of the most important concepts in Java — a concept that is frequently asked in interviews and often answered incorrectly. 🔑 What we understood today: ✔ What is a Platform → Platform = Microprocessor + Operating System ✔ Why C and C++ are Platform Dependent → Compilation and execution must happen on the same platform ✔ The real industry problem with platform dependency → Limited users, limited reach, limited scalability ✔ Java Compilation Flow → Source Code → Bytecode → JVM → Machine Code ✔ Java is Platform Independent ✔ JVM is Platform Dependent ✔ WORA – Write Once, Run Anywhere ✔ Java is Portable and Architecture Neutral 💡 You write the program once. Java makes it run on every platform. This is not just theory — this is how Java scaled globally and stayed relevant for 30+ years. From here onwards, our Core Java journey officially begins 🚀 Step by step. Concept by concept. Interview ready. #Java #PlatformIndependent #JVM #WORA #CoreJava #TapAcademy #JavaInterview #LearningJourney
To view or add a comment, sign in
-
-
🚀 Day-54 of My 60 Days Java Challenge. 📌 Today’s Topic: Set in Java Today I focused on Set, an important interface in the Java Collections Framework used to store unique elements. 📌 What is Set? 👉 Set is a collection that does NOT allow duplicate elements. 👉 Order depends on the implementation. 🔹 Key Implementations of Set 1️⃣ HashSet 2️⃣ LinkedHashSet 3️⃣ TreeSet 🔹 Common Features of Set ✔ No duplicates ✔ Allows at most one null (HashSet) ✔ Faster search than List ✔ Used for uniqueness & validation METHODS: add(E e) addAll(Collection<?> c) remove(Object o) removeAll(Collection<?> c) retainAll(Collection<?> c) contains(Object o) containsAll(Collection<?> c) size() isEmpty() clear() iterator() toArray() equals(Object o) hashCode() 📌 NOTE 1: Set does NOT support index-based methods like get() or set(). 📌 NOTE 2: Use retainAll() for intersection, removeAll() for difference, and containsAll() for validation. 🔍 Keep practicing, keep coding, and let’s inspire each other to grow stronger in programming. 💬 Got any doubts or suggestions? Feel free to share them in the comments ⬇️. ✨ Stay tuned for the practical examples with code! ✨ Stay tuned — Day 55 is on the way tomorrow! #Java #Set #JavaCollections #CollectionsFramework #CoreJava #LearningInPublic #60DaysOfCode #JavaDeveloper #Programming
To view or add a comment, sign in
-
-
Day 13 & 14 - 🚀Methods in Java and Their Types In Java, a method is a block of code that performs a specific task. Methods help write clean, reusable, and well-structured code. 🔹 What is a Method? A method: ✔ Reduces code duplication ✔ Improves readability ✔ Makes programs easier to maintain 🔹 Basic Method Syntax accessModifier returnType methodName(parameters) { // method body } ➡️Types of Methods in Java 1️⃣ Predefined Methods Built-in Java methods like println() and sqrt() 2️⃣ User-Defined Methods Methods created by the programmer 3️⃣ Static Methods Belong to the class and can be called without creating an object 4️⃣ Instance Methods Belong to objects and are called using object references. 🔹 Method Overloading When multiple methods have the same name but different parameters, it’s called method overloading. ✨ Pro Tip: Small, well-named methods make your Java code cleaner and more professional. 💬 Are you learning Java right now? Let’s grow together 🚀 #Java #CoreJava #Programming #OOP #JavaMethods #CodingJourney
To view or add a comment, sign in
-
-
🚀 100 Days of Java | Day 2 Understanding My First Java Program Day 2 was all about slowing down and truly understanding what happens inside a simple Java program. Today, I focused on breaking down my first Java program line by line instead of just running it and moving on. I explored how the structure of a Java program is organized and why each part exists. Key concepts I learned today: 🔹 Class declaration – how every Java program starts with a class 🔹 Access modifiers – understanding the role of public 🔹 Main method – why public static void main(String[] args) is the entry point 🔹 Keywords like class, static, void and their purpose 🔹 Command-line arguments and where they fit 🔹 System.out.println() – how output is printed to the console 🔹 Difference between class, method, object reference, and output statement Instead of memorizing syntax, I’m focusing on why things are written the way they are. This clarity makes the language feel less intimidating and more logical. Small steps, strong basics. 📘 Day 2 completed. Consistency over comfort. One day at a time 💪 10000 Coders hashtag#100DaysOfJava hashtag#JavaJourney hashtag#LearningJava hashtag#CoreJava hashtag#ProgrammingBasics hashtag#DailyLearning hashtag#SoftwareDeveloper hashtag#10000Coders
To view or add a comment, sign in
-
📘 Day 15 ,16,17– Understanding Methods in Java & JVM Execution On Day 15,16,17 I explored one of the most fundamental building blocks of Java — Methods. 🔹 What is a Method? A method is a block of code defined inside a class that performs a specific task. It improves code reusability, readability, and modularity. 🔹 Method Signature Includes: Access specifier Return type Method name Parameters (inside parentheses) 🔹 Types of Methods in Java: No Input, No Output No Input, With Output With Input, No Output With Input, With Output 🔹 JVM & Memory Flow (Behind the Scenes): When program execution starts, the object is created in the Heap segment The reference variable is stored in the Stack segment Each method call creates a new stack frame After method execution, its stack frame is removed Finally, the main() method stack frame is removed Objects without references become garbage, collected by the Garbage Collector 🔹 Execution Order Java follows LIFO (Last In, First Out) principle in stack memory: Last method called → First method removed 🔹 Important Concept Parameters → Variables that receive values Arguments → Values passed to the method Understanding how methods work internally with the JVM helps write efficient, optimized, and interview-ready code. Learning step by step and enjoying the journey 🚀 #Java #CoreJava #MethodsInJava #JVM #StackAndHeap #LearningJourney #Day15 #ProgrammingConcepts
To view or add a comment, sign in
-
-
🧠 Java Basics: The Building Blocks of Code Whether you're just starting your programming journey or revisiting the fundamentals, understanding Java's core components is essential. Here's a quick breakdown of the pillars that power every Java program: 🔹 Variables Think of variables as labeled containers that store data. Java requires you to declare the type of data each variable holds — making your code predictable and efficient. 🔹 Data Types Java offers both primitive types (like int, float, char, boolean) and non-primitive types (like String, arrays, and classes). Choosing the right type is key to memory management and performance. 🔹 Operators Operators are the tools that let you manipulate data. From arithmetic (+, -, *, /) to relational (==, !=, >, <) and logical (&&, ||, !), they help you build logic into your code. #Java, #JavaProgramming, #ProgrammingBasics, #SoftwareDevelopment, #LearnToCode, #TechEducation, #CodeNewbie, #BackendDevelopment, #ObjectOrientedProgramming, #CodingJourney, #TechCommunity
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