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.