Since class names and variable names are used in similar ways, it might be hard to tell which is which. All the built-in, predefined names in Java follow the rule that class names begin with an upper case letter while variable names begin with a lower case letter. While this is not a formal syntax rule, I recommend that you follow it in your own programming. Subroutine names should also begin with lower case letters. There is no possibility of confusing a variable with a subroutine, since a subroutine name in a program is always followed by a left parenthesis.
Classes can contain static member subroutines, as well as static member variables.
For example, the System class contains a subroutine named exit . In a program, of course, this subroutine must be referred to as System.exit . Calling this subroutine will terminate the program. You could use it if you had some reason to terminate the program before the end of the main routine. The parameter tells the computer why the program is being terminated.