Comp 110 Constructors

General form of a constructor, within a class:

public class <classname> {
  public <classname>(<parameter list>) {
    <constructor body>
  }
}

The purpose of a constructor is to initialize all of your instance variables.

Dorian walks through constructors and fields.