yes , you need minimum one class . Show activity on this post. JAVA required at least one class in a program because at the time of execution of Java programs we needed to provide the name of a class which contains the main () method.
Read moreWhy do we need a class?
In object-oriented programming, a class is an extensible program-code-template for creating objects, providing initial values for state (member variables) and implementations of behavior (member functions or methods) .
Read more