Home Java Java-tips Summaries Summary: Methods

Ask Questions?

View Latest Questions



Summary: Methods
Posted on: July 27, 2006 at 12:00 AM
Method parameters are separated by commas.

Java: Summary: Methods

Method parameters are separated by commas. Parameters are converted to these larger or equal types (int, long, double).
If you have a main method, it must be declared
   public static void main(String[] args)
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.
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