The compiler doesn't call any methods in the code it is compiling. The JVM created by the java command calls the main() method to start a class's execution.