Designing the Public Interface of a Class: Method Definition
- access specifier (such as public)
- return type (such as String or void)
- method name (such as deposit)
- list of parameters (double amount for deposit)
- method body in { }
Examples:
- public void deposit(double amount) { . . . }
- public void withdraw(double amount) { . . . }
- public double getBalance() { . . . }