Site hosted by Angelfire.com: Build your free website today!
 

Methods

Reference: Details of a Method Declaration

  • Methods are similar to functions, procedures or subroutines in other languages.

  • The methods of a class expose the behavior of a class.

  • We will focus on class methods here, and discuss instance methods later.

As with variable, a method become a class method by the use of the static keyword.

  • Access keywords: public, protected, or private.

  • Return type: any Java data type or void.