Lakhyadeep Sen’s Post

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

To view or add a comment, sign in

Explore content categories