In the Project window, right-click a Java file or folder, and select New > Java Class . Alternatively, select a Java file or folder in the Project window, or click in a Java file in the Code Editor. Then select File > New > Java Class. The item you select determines the default package for the new class or type.
Read moreHow do you create a class and method in Java?
Java Class Methods
Read moreHow do you initiate a class in Java?
To initialize a class member variable, put the initialization code in a static initialization block , as the following section shows. To initialize an instance member variable, put the initialization code in a constructor.
Read moreHow do you create a class?
Create a class
Read more