Multiple Main Functions

In Java, the computer determines the “entry point” when you actually execute the program, not when you compile. For example, from the command-line

java MyClass

searches for main() in MyClass. All other main() functions are ignored.

If you are using an IDE, then you can set which class contains the main() function that you want to use.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)