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 (1)
Nice write-up! For devs who deal with messy copied text, TextStow might help — it's a Mac menu bar tool combining clipboard history with prompt templates and text cleanup. Free: textstow.com