What is Class?
→class is a collection of data members, constructors and method in a single unit is called class.
→Where data and code are bounded to in a single unit is called class.
Syntax :
access specifier class <classs name>
{
Data Member;
Constructor;
Method;
..............
..............
}
What is Object?
→Object is an instance of the class.
→It is also known as the blue print of class.
→Object is used to access the properties of a class.
syntax :
classname objectname=new classname();