Java program has at least one class that knows how to do certain things or how to represent some type of object.
A java program source file will have a class, inside the class there would be methods and inside the method, there would be statements (fields, attributes or properties).
The class represents a piece of your program and there can be multiple classes inside on java program. The class starts opening curly braces and ends with the closing curly braces and ends with the curly braces.
The methods must be declared inside a class. Within the curly braces of a method, instructions for that method are performed. Method code is basically a set of statements, attributes or properties.