proper definition of class and object in java
Answers
An object is an identifiable identity with characteristics and behaviour.It is the instance of a class.For real life example banana,apple are objects and fruit is the class.
Class is a blue print or template from which objects are created.It represents a set of objects that share common characteristics and behavior.class is called the object factory because class generate objects.For example Vehicle is the the class and bus,car,cycle are its objects.
Hope this helps
A class, in the context of Java, are templates that are used to create objects, and to define object data types and methods. Core properties include the data types and methods that may be used by the object. All class objects should have the basic class properties.
Object − Objects have states and behaviors. Example: A dog has states - color, name, breed as well as behaviors – wagging the tail, barking, eating. An object is an instance of a class. Class − A class can be defined as a template/blueprint that describes the behavior/state that the object of its type support.