As we all know Java program will start executing from the public static void main(String[] args) method of the class.
So was curious to know that is there any other way by which we can make another static method as the entry point, that is can we override this property of the JVM to start with some other method than main?
AFAIK the JVM always starts with the main method. The only official reference I was able to find is in section 12.1.4 of the java language specifications, which states:
That doesn’t seem like an awful restriction to me, though. You could technically write a “MainSelector” class whose main() takes the fully qualified name of a class and method as a command line argument, and uses reflection to invoke that method.