Answer by Jonathan Paulson:

"public" means that main() can be called from anywhere.
"static" means that main() doesn't belong to a specific object
"void" means that main() returns no value
"main" is the name of a function. main() is special because it is the start of the program.
"String[]" means an array of String.
"args" is the name of the String[] (within the body of main()). "args" is not special; you could name it anything else and the program would work the same.

If you're just starting out, it's best to follow the mysterious incantation and not worry too much about what it means (for a bit).

What does each term in "public static void main(String[] args)" mean?

Advertisements