I have noticed in java programs at least, that people tend to prefer to start their programs by creating and instance of the class that contains the main method, and activating a non-static method within it, like so
class MainClass {
void start() {
//start the program flow
}
public static void main(String[] args) {
new MainClass().start();
}
}
Than to simply start the program flow through the main method from a static context, like so
class MainClass {
public static void main(String[] args) {
//start the program flow
}
}
I was wondering, why do people prefer the former method as the latter seems simpler, and is there something that should determine which one I should use?