A good answer might be:
|
Method DefinitionMethod definitions look like this:
The returnType is the type of value that the method hands back to the caller of the method. Your methods can return values just as do methods from library classes. For example the length() method of class String returns an int type. The return statement is used by a method to hand back a value to the caller. If you want a method that does something, but does not hand a value back to the caller, use a return type of void and do not use a return value with the return statement. The return statement can be omitted; the method will automatically return to the caller after it executes. Here is the method from the example program:
|
QUESTION 8:Does this method have a parameter list? Click Here after you have answered the question |