Class:
A class is a group of objects which have common properties. It is a blueprint or template from which object is created. It is logical entity. Class is a user defined blueprint or prototype from which objects are created.
In java class contains:
- Fields
- Methods
- Constructor
- Blocks
- Nested class
- Interface
Syntax to declare a class:
class class_name
{
field;
method;
}
Top comments (0)