book: Oracle Certified Professional
Java SE 11 Programmer I Study Guide Exam 1Z0-815
chapter: 1
If a main() method isn’t present in the class we name with the .java executable, the process will throw an error and terminate. Even if a main() method is present, Java will throw an exception if it isn’t static.
but if the main method is not marked as static Java will also throw an
error, not an exception
method main non-static:
Error: Main method is not static in class Main, please define the main method as:
public static void main(
String[] args)