Posts

Class and Object in Java | Coders Pathshala

Image
   Class and Object in Java Hello Coders, Welcome to  "Coders Pathshala" . Today we are going to understand the concept of  "Class and Object"  in  Java . So let us start with it.  Java  is an object-oriented programming language. So understanding the concept of  "Class and Object"  is of utmost importance. A class is a basic building block of all Java programs. It is a logical way to group together : 1. fields that hold values (Data) 2. methods that operate on those fields Class = Field (Data) + Methods The class provides the structure or blueprint for creating objects. Let us take an illustration of a designer of a house who fundamentally determines a plan of a house for example how might it look like yet doesn't assemble any house. Based on this plan, a builder can build at least one house. Similarly a class indicates the format for making objects. It possibly portrays how the object will appear as though when they are created. So a c...