Concept

What role does the main() method play in a Java program?

ComputerScienceOne / The javamain() Method

"Every executable program has to have a beginning: a point at which the program starts to execute. In Java, a class may contain many variables and methods, but a class is only executable if it contains a main() method. When a Java class is compiled and the JVM is started, the JVM loads the class into memory and starts executing code contained in the main() method. In addition, our main() method takes an array of String types which serve to communicate any command line arguments provided to the program (review Section 2.4.4 for details). The array, args stores the arguments as strings."

Related Ideas

What role does the main() method play in a Java program? | ComputerScienceOne | Bifalgorithm | Bifalgorithm