1) "Default" should not be the main function in the project. Your projects require a basic function if it is intended to be executed (i.e., with java -jar myApp.jar). It should not have a core function if it is "only" a library that is used by other projects.
2) It can be useful if: a) you have a complex build process that creates several cans, b) you expect that for each execution of your program the main class to be selected is set using the command line (I don’t know the syntax, but it should be possible). For example, you can provide your application as a single jar file with several .bat or shell scripts, each of which runs a different main class in the bank.
source share