While learning object oriented programming in Java, the next step was understanding classes and objects. At first the terms sounded simple, but writing small examples made the idea clearer. Things that became clear : - a class acts like a blueprint that defines what properties and behaviours something will have - an object is the actual instance created from that blueprint - objects allow programs to represent real world entities in code - data and the operations on that data stay grouped inside the same structure - multiple objects can be created from the same class, each having its own state A simple example helped visualize this better : class Student { int rollNo; String name; void display() { System.out.println(rollNo + " " + name); } } Objects created from this class can store different student details while using the same structure. Understanding this idea made it clearer how Java programs move from simple logic to modelling real world entities. #java #oop #programming #learning #dsajourney
Lakhyadeep Sen’s Post
More Relevant Posts
-
While studying object oriented programming in Java, access modifiers explain how data and methods can be accessed from different places in a program. They help control visibility and protect the internal structure of classes. Things that became clear : • access modifiers define where a variable or method can be accessed • private members are accessible only inside the same class • default members are accessible within the same package • protected members are accessible within the same package and also in subclasses • public members can be accessed from anywhere These access levels help control how different parts of a program interact with each other. A simple structure shows how access modifiers appear in code : class Example { private int a; int b; protected int c; public int d; } Using the correct access level helps maintain better control over data and keeps the program structure organized. #java #oop #programming #learning #dsajourney
To view or add a comment, sign in
-
Another important concept while learning object oriented programming was understanding how variables behave inside a program. Depending on where a variable is declared and how it is used, Java treats it differently. Things that became clear : • local variables are declared inside methods and exist only during that method execution • instance variables are declared inside a class but outside methods, and each object gets its own copy • static variables belong to the class itself and are shared among all objects • local variables do not get default values, while instance and static variables do • the place where a variable is declared affects its lifetime and accessibility Seeing these differences made it clearer how memory and data management work inside a Java program. Understanding variable behaviour also helps avoid common mistakes when writing larger programs. #java #oop #programming #learning #dsajourney
To view or add a comment, sign in
-
Completed the object oriented programming section in Java. At the beginning it felt like a collection of separate topics, but while going through the concepts step by step it became clearer how everything connects. Things that stood out while learning this section : - classes and objects form the basic structure of object oriented programs - variables, constructors, and access modifiers help control how objects are created and how data is accessed - encapsulation protects internal data and allows controlled interaction - inheritance allows classes to reuse behaviour instead of rewriting logic - polymorphism makes programs more flexible by allowing the same operation to behave in different ways - abstraction helps focus on what an object does rather than how it does it One noticeable shift was moving from thinking about programs as a sequence of steps to thinking about them as groups of interacting objects. The concepts are simple individually, but together they create a much more organized way of designing programs. #java #oop #programming #learning #dsajourney
To view or add a comment, sign in
-
🚀 Java Concepts Made Simple (Visual Notes) While learning Java, I created my own notes to understand concepts like: • JVM & JRE • Platform Independent Programming • Classes & Objects • Variables & Data Types • Naming Conventions • Type Casting Later I enhanced these notes using AI to make them cleaner and more readable, so anyone starting with Java can understand them easily. Swipe through the slides to explore the concepts 📚 If you are learning Java, save this post for revision. Anshika Sinha Sonam Yadav Roshani Kumari #java #programming #coding #javadeveloper #learnjava #computerscience #codingjourney
To view or add a comment, sign in
-
🚀 Day 2/45 – Understanding Variables and Data Types in Java Today was the second day of my 45 days Java learning journey, and I focused on understanding one of the most fundamental concepts in programming: Variables and Data Types. In any programming language, variables act as containers that store data which can be used and manipulated throughout a program. Learning how to declare and use them correctly is an important step toward writing efficient programs. 📚 What I Learned Today Today I explored how Java handles different types of data and how they are stored in memory. Some of the key concepts I learned include: ✔ Declaring and initializing variables in Java ✔ Understanding primitive data types such as int, double, char, and boolean ✔ How variables help store and manage values in a program ✔ Writing simple programs using variables for calculations and output 💻 Practice Programs To strengthen my understanding, I practiced small programs such as: • Storing and printing student details using variables • Adding two numbers using integer variables • Calculating the area of a rectangle using length and width variables Example: class Addition { public static void main(String args[]) { int a = 10; int b = 20; int sum = a + b; System.out.println("Sum = " + sum); } } 🎯 Key Takeaway Even though variables and data types seem simple, they are the foundation of programming logic. Mastering these basics will make it easier to learn advanced concepts like loops, functions, and object-oriented programming. I will continue learning and sharing my progress as I move forward in this journey. #Java #Programming #LearningInPublic #CodingJourney #SoftwareDevelopment #Consistency
To view or add a comment, sign in
-
🚀 I’ve just published my Java Day 3 article — and today’s learning was more about understanding how Java thinks than just writing code. When I started, I thought programming is only about printing output and running programs. But today I learned something different: 👉 Some words in Java are special (keywords) — you can’t just use them anywhere 👉 Some values should never change (constants using final) 👉 And sometimes data needs to change its type to make things work (type conversion) Honestly, at first these topics sounded boring and too “theory-like”. But once I tried them in code, I realized how important they are for writing clean and safe programs. Day by day, Java is feeling: ✔ Less scary ✔ More logical ✔ More interesting From “Hello World” to actually understanding how data works inside Java — this journey already feels worth it. #Java #LearningInPublic #BCA #BeginnerDeveloper #CodingJourney #LearnJava #StudentLife #Programming #Day3 #Java
To view or add a comment, sign in
-
-
🚀 Day 12/45 – Understanding Constructors in Java On Day 12 of my Java learning journey, I explored the concept of Constructors, which play an important role in object initialization. Constructors are automatically called when an object is created and help in assigning initial values to object properties. 📚 What I Learned Today Today I learned: ✔ What constructors are and how they work ✔ Difference between constructors and methods ✔ Default constructors ✔ Parameterized constructors for initializing values 💻 Practice Work To apply my learning, I implemented: • A program using a default constructor • A program using a parameterized constructor • Creating multiple objects with different values 🎯 Key Takeaway Constructors make object creation more efficient and organized by initializing data at the time of object creation. This concept is very important for building structured and scalable applications. Learning OOP step by step is making programming more interesting. #Java #Programming #LearningInPublic #CodingJourney #SoftwareDevelopment #OOP
To view or add a comment, sign in
-
🚀 Day 33 of Learning Java — Multithreading Deep Dive! Multithreading has been one of the toughest topics for me so far — but I refused to move on without truly understanding it. So today I went back to basics and practiced hands-on. 🔧 What I built today: ✅ Program 1 — Even & Odd Number Printer using two threads • Implemented Runnable interface with custom start & end fields • Used start() to launch threads and join() to make main wait • Applied i % 2 == start % 2 logic to auto-filter even or odd numbers per thread ✅ Program 2 — Synchronized Shared Printer • Two users (User1, User2) sharing a single Printer object • Used synchronized block to prevent race conditions • Only one thread can access the printer at a time — clean and safe output! 💡 Key Takeaways: → start() creates a NEW thread | run() does NOT → join() makes the calling thread wait → synchronized prevents data corruption on shared resources → Struggling with a concept? Go back and PRACTICE — it clicks eventually! Some days are hard. Some concepts feel impossible. But showing up on Day 33 still writing code means more than perfect understanding on Day 1. 💪 #Java #JavaDeveloper #Multithreading #LearningInPublic #Programming #Threads #Synchronized #CodeNewbie #SoftwareDevelopment #BackToBasics #JavaProgramming #TechJourney #OpenToWork #LinkedInLearning
To view or add a comment, sign in
-
🚀 Turning Strings into Powerful Tools | Java Learning Journey Today’s class was all about exploring the power of built-in String methods in Java — small functions, but a huge impact on real-world programming! 💡 What I learned today: ✨ "length()" helps measure data ✨ "charAt()" allows precise character access ✨ "substring()" extracts meaningful parts of text ✨ "equals()" ensures accurate comparison ✨ "toUpperCase()" / "toLowerCase()" improves data consistency ✨ "trim()" cleans unwanted spaces ✨ "replace()" transforms data easily 🔍 One key takeaway: 👉 Strings in Java are immutable, meaning every operation creates a new string instead of modifying the original. 📈 Why this matters? These methods are widely used in: ✔️ Form validation ✔️ Data processing ✔️ Backend development ✔️ Real-world applications 🌱 Every small concept I learn is helping me build a strong foundation in Java development. Excited to keep learning and growing every day! 🚀 #Java #CodingJourney #Programming #DeveloperLife #TechLearning #StudentDeveloper #FutureEngineer
To view or add a comment, sign in
-
-
Another concept that appears when working with constructors is constructor overloading. It allows a class to have multiple constructors so that objects can be created in different ways depending on the information available. Things that became clear : • constructor overloading means having multiple constructors in the same class • each constructor must have a different parameter list • it allows objects to be initialized with different sets of values • Java decides which constructor to use based on the arguments passed during object creation • it helps make classes more flexible and easier to use A simple example shows how different constructors can be used : class Student { String name; int age; Student() { System.out.println("Default constructor"); } Student(String name, int age) { this.name = name; this.age = age; } } In this case, objects can be created either without values or with specific values depending on which constructor is called. Understanding constructor overloading made it clearer how classes can support different ways of creating objects. #java #oop #programming #learning #dsajourney
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