Рет қаралды 28
A class is a group of objects which have common properties. It is a template or blueprint from which objects are created. It is a logical entity. It can't be physical.
Object creation with new keyword in Java
The new keyword is used to allocate memory at runtime. All objects get memory in Heap memory area.
A class in Java can contain:
Fields
Methods
Constructors
Blocks
Nested class and interface