The Hello World-Tutorial of JavaFX says:
The main() method is not required for JavaFX applications when the JAR file for the application is created wi
One possible answer would probably be, that there is a main
method declared in Application
. And if another class, which extends from Application
, has its own main
method, the code would still be valid and the main
method of Application
will be ignored::
class Main extends OtherMain {
public Main(String text) {
System.out.println(text);
}
/* If this method is removed, the main-method is called from OtherMain */
public static void main(String[] args) {
new Main("Called from Main-Class");
}
}
class OtherMain {
public static void main(String[] args) {
new Main("Called from Other-Main-Class");
}
}
Does this make sense?