Posts

Showing posts with the label object

Class and Objects

From this article we are starting to do object oriented programing in Java. In object-oriented programming technique, we design a program using objects and classes.Object is the physical as well as logical entity whereas class is the logical entity only. Objects in Java An entity that has state and behavior is known as an object e.g. chair, bike, marker, pen, table, car etc. It can be physical or logical.t is a basic unit of Object Oriented Programming and represents the real life entities.A typical Java program creates many objects, which interact by invoking methods. An object consist of : 1. State : It is represented by attributes of an object. It also reflect the properties of an object. 2. Behavior : It is represented by methods of an object. It also reflects the response of an object with other objects. 3. Identity : It gives a unique name to an object and enables one object to interact with other objects. If you compare the software object with a real...