|
accessSpecifier class ClassName
{
constructors
methods
fields
}
|
Example:
|
public class BankAccount { public BankAccount(double initialBalance) { . . . } public void deposit(double amount) { . . . } . . . }
|
Purpose:
To define a class, its public interface, and its implementation details
|