So what is your problem?
The JVM requires a method with the following syntax
public static void main(String[] args)
to be present in your class in order to be able to run this class.
Of course you can also have a method which is private. There is nothing
wrong with it.
Why should the compiler complain? Since the method signature does not match
the requirements
of course this class cannot be executed.
I do not understand what your problem is. You get the error that you deserve
when you try to run your
class.