Advanced Java – Day 1 Day 1 was less about “advanced” stuff and more about getting into the core •Revisited the basics that actually matter: •How Java works internally (source code ➡️ bytecode ➡️JVM) •Why Java is platform independent •Difference between JDK, JRE, and JVM •Primitive vs non-primitive data types •Core OOP concepts like class, object, encapsulation, abstraction, and polymorphism •How memory works (stack, heap, static, string pool) I also practised these concepts by building a simple calculator program to understand how logic, methods, and objects actually come together and a constrain based if-else problem. Seeing it run made things clearer. Looking forward to learning more step by step. #Java #LearningInPublic #AdvancedJava #ProgrammingBasics #StudentLife #Consistency
Java Fundamentals: Core Concepts and Basics
More Relevant Posts
-
Day 2 of Learning Java & Now I Know What Happens Behind the Scenes 👀 Yesterday was about why Java exists. Today was about how Java actually works. And honestly… this is where things got interesting. When we write Java code, it doesn’t directly talk to the computer. Here’s the real flow: .java → javac → .class (Bytecode) → JVM → Machine Code → CPU The magic? ✨ That bytecode is platform independent. And who handles everything? 👉 JVM – The Heart of Java Inside JVM: • Interpreter converts bytecode line-by-line • JIT (Just-In-Time Compiler) compiles frequently used code into native machine code • Garbage Collector manages memory • Security sandbox keeps execution safe This is why Java is called Hybrid It’s both compiled AND interpreted. Now the hierarchy finally makes sense: JVM → Runs bytecode JRE → JVM + Libraries (to run programs) JDK → JRE + Tools (to develop programs) In simple words: Want to run Java? → JRE Want to build Java? → JDK Day 2 and things are already connecting deeper. Not just learning syntax but understanding actual architecture. Foundation > Frameworks 🔥 Special thanks to Aditya Tandon Sir & Rohit Negi Sir 🙌 #Java #CoreJava #BackendDevelopment #LearningJourney #Developers #BuildInPublic
To view or add a comment, sign in
-
-
🚀 Java Core Interview Series – Part 2 Encapsulation in Java Encapsulation is one of the most important OOP principles in Java. It ensures: ✔ Data Hiding ✔ Controlled Access ✔ Secure Object State ✔ Better Maintainability In real backend development: Entities, DTOs, and Services rely on encapsulation. Spring Boot uses getters/setters for data binding and validation internally. Without encapsulation: account.balance = -500 ❌ (Invalid state possible) With encapsulation: Invalid updates are prevented through business logic ✅ Strong Encapsulation = Secure & Maintainable Backend Code 🔥 I’ve explained the concept with a practical BankAccount example in this post. You can find my Java practice code here: 🔗 https://lnkd.in/gkmM6MRM More core Java concepts coming next 🚀 #Java #Encapsulation #OOPS #BackendDevelopment #CoreJava
To view or add a comment, sign in
-
📘 Today I Learned — Java static Keyword 🔹 What I Learned •static makes a variable or method belong to the class, not the object. Useful for memory efficiency and operations that don’t depend on object state. 🔹 Key Concepts •Static Variables Only one copy exists for the entire class Shared by all objects •Static Methods Can be called without creating an object Can access only static data Ideal for utility functions •Static Block Runs once when the class loads Used to initialize static variables Executes before main() •Static Inner Class Only inner classes can be static 🔹 Why It’s Important •Helps optimize memory •Supports efficient utility operations •Useful for one-time initialization •Reduces unnecessary object creation #Java #OOPs #StaticKeyword #JavaProgramming #FullStackDeveloper #LearningJourney #TapAcademy #CodingBasics
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
-
-
Day 9 of 100 | Encapsulation Today I worked on Encapsulation in Java — and it made more practical sense than ever. Encapsulation isn’t just a definition. It’s about: ✔ Keeping variables private ✔ Controlling access using getters and setters ✔ Preventing unwanted changes to data In simple terms, it’s Java saying: “Access allowed… but only in the right way.” 😄 Small concept on paper, but it changes how you design programs. Step by step, writing cleaner and safer code #Day9 #100DaysOfCode #Java #OOP #Encapsulation #LearningInPublic #BackendJourney
To view or add a comment, sign in
-
-
Threads state & Priority in java 🧵 After understanding what thread is and how to create one, the next question is: ➡️What state my thread is and how does the JVM schedule it? 🧠Threads States in Java A thread can be in one of these states during its lifecycle: 🔸NEW Thread is created but not yet started (start() method is not called) 🔸RUNNABLE Thread is ready to run or concurrently running 🔸BLOCKED Waiting to acquire a monitor lock (synchronized block) 🔸 WAITING Waiting indefinitely for another thread to act 🔸TIMED_WAITING Waiting for a specified time( sleep(), wait(timeout), join(timeout) ) 🔸TERMINATED Execution completed 👉A thread doesn't move linearly - it can jump between states multiple times. ---------------------------------------------------------------------- ⚡Thread Priority in Java Each thread has a priority that hints the scheduler: ✓MIN_PRIORITY — 1 ✓NORM_PRIORITY — 5(default) ✓MAX_PRIORITY — 10 ☘️Example: Thread t = new Thread(task); t.setPriority(Thread.MAX_PRIORITY); IMPORTANT ⚠️ 1.Priority is a hint, not a guarantee. 2.Behaviour is OS and JVM dependent. 3.High priority doesn't mean it will always run first. #Java #Threads #Concurrency #Multithreading #SoftwareEngineering #Backend #Programming
To view or add a comment, sign in
-
-
Ever wondered why you can’t create your own class named java.lang.String? 🤔 We often hear that Java is "secure" and "platform-independent," but how does that actually work under the hood? In my latest Medium article, I break down the internals of the JVM, moving from the basics to the complex mechanisms that keep Java applications stable. In this guide, I cover: ✅ The Ecosystem: The real difference between JVM, JDK, and JRE. ✅ Platform Independence: How "Write Once, Run Anywhere" is achieved via bytecode. ✅ Class Loading: A deep dive into the Parent Delegation Model. I specifically explore how the Bootstrap, Platform, and Application ClassLoaders interact. Understanding this delegation hierarchy is key to understanding why core Java classes cannot be overridden—a massive security feature. If you are brushing up on Java internals or preparing for technical interviews, this guide simplifies the complex architecture. #Java #JVM #SoftwareEngineering #Coding #TechEducation #JavaDeveloper #Programming You can read the full blog here : https://lnkd.in/gVJzk2Pp
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
-
-
Day 2/100 programs 🔹 Majority Element Problem | Java Implemented an efficient solution to the Majority Element problem in Java, where the task is to find the element that appears more than ⌊ n/2 ⌋ times in an array. 💡 Approach Used: Boyer–Moore Voting Algorithm Optimized for O(n) time complexity and O(1) space complexity 🧠 Key Learnings: Importance of algorithmic thinking over brute force How voting-based logic eliminates unnecessary comparisons Writing clean and readable Java code for interview-style problems 🚀 Why it matters: This problem is a classic example of turning a mathematical insight into a highly optimized solution—commonly asked in technical interviews and competitive programming. 📌 Tech Stack: Java | DSA | Algorithms
To view or add a comment, sign in
-
-
How Java Really Works Behind the Scenes ☕⚙️ Most of us write Java code every day. Very few stop to think about what actually happens after we hit “Run.” Here’s a simple mental model that changed how I look at Java 👇 🧩 Java doesn’t run directly on your OS It runs through layers, each with a clear responsibility: 1️⃣ Source Code (.java) We write human-readable code — classes, objects, and methods. 2️⃣ Compiler (javac) The compiler converts source code into bytecode (.class) ✔ Platform-independent ✔ Not yet machine code 3️⃣ JVM (Java Virtual Machine) This is where the real magic happens: - Loads bytecode - Verifies it - Interprets or JIT-compiles it - Executes it safely 4️⃣ JRE (Java Runtime Environment) The JVM doesn’t work alone. It relies on the JRE for: - Core libraries - Runtime dependencies - Memory management support A simple analogy I like 💡 : JDK → The full kitchen (for cooking + learning) JRE → The kitchen setup (oven, mixing bowls, ingredients) JVM → The oven that actually cooks the dish Understanding Java isn’t just about syntax. It’s about understanding why the JVM exists and how execution really flows. If you work with Java in production, this mental model is a must. #Java #JVM #JRE #BackendEngineering #SoftwareArchitecture #EnterpriseSystems #LearningInPublic
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