As a library of program units begins to grow, and as new program elements are obtained from the network or from vendors, problems may arise when the same variable or function name is used in different contexts.
Languages and program development environments try to reduce the impact of a change.
More generally, a Java "program" or stand-alone application is named by the class name in which the main method resides, and it is executed by supplying that class name to the Java Interpreter.