Java class is the basic building block of Java programming language. Java class is a template that is used to create objects, and to define data types and methods.Java class objects should have the basic class properties.
Syntax:
class <class-name>{ [data members]; [methods]; }
class <class-name>
{
[data members];
[methods];
}
For a detailed tutorial, visithttps://www.c-sharpcorner.com/article/a-complete-java-classes-tutorial/
A class is declared by use of the class keyword. Class body is enclosed between curly braces { and }. The data, or variables, defined within a class are called instance variables. The code is contained within methods. Collectively, the methods and variables defined within a class are called members of the class.
Default modifier is friendly.
Syntax
class
body