Of so first let's consider this
1. Since main method is static Java virtual Machine can call it without creating any instance of class which contains main method.
this:
2.Anything which is declared in class in Java comes under reference type and requires object to be created before using them but static method and static data are loaded into separate memory inside JVM called context which is created when a class is loaded. If main method is static than it will be loaded in JVM context and are available to execution.
and finally this:
3. Main method is entry point for any Core Java program. Execution starts from main method.
So in conclusion: Java first charge your Main method, the public
make this method accessible from everywhere for the JVM, and static
set the method in the JVM context so the first thing that the JVM loads it's your main method!
Class Hello{}
just make your class accessible to all classes from the same package.