When writing java programs, it is often necessary to test whether this class can achieve its purpose.
Finally, keep these test codes.
So after the whole project is over, there may be many main () methods in the code.
But in java, there can only be one main () method in each class, or there can be none.
Finally, at the end of the whole project, you will find a main () method that can guide the whole program to run as the entrance of the program.
Therefore, in a complete java program, there may be multiple main () methods.
But as a program entrance, you can only choose one of them.