See video on udemy.
Functions' name needs to represent the task it's performing.
public
means the function can be publicly accessed from any package or subfolder,
but because we've got only one package with a single class in it,
it doesn't really matter what level of access you specify.
You can notice that main()
is also a function, it has a very similar signature to our functions.
Every function has a specific task that it performs, the main()
function performs the task of running our application.
The main()
function has a very specific signature that the JVM looks for when you run your app, when it finds main()
function, it executes it.