Java: Summary: Methods

Parameters
Method parameters are separated by commas. Parameters are converted to these larger or equal types (int, long, double).
main
If you have a main method, it must be declared
   public static void main(String[] args)
signature
To decide which method to call, Java looks at the method signature (method name, type and order of the parameters). The signature of the caller and celled method must match. The signature does not include the return type, or parameter names.
return
If a method does not return a value, there is no need for a return statement. If a method returns a non-void value, it must use a return statement.

Last update: 1999-05-11 Copyright 1999 Fred Swartz