| | |
Summary: March 23, 2008 Intro. to Comp.: The course 1
Methods
March 23, 2008 Intro. to Comp.: The course 2
Outline
What is a method
Method Structure
Method invocation
Method Types
Local Variables
Return Statement
Method Parameters
March 23, 2008 Intro. to Comp.: The course 3
- What is a method ...
A Java application program consists of one or more classes.
Each class has one or more methods
Each method consists of one or more statements
Each method has a name.
One of the methods must be called main
When a Java application program is run, the run-time system
automatically invokes the method named main
|