PPT Slide
Creating Instances of Classes
1. Creating the reference: Box thisBox ;
2. Instantiating the object: thisBox = new Box( );
OR do first two steps at once, e.g.,
3. Having constructor(s) set initial values:
public Box (int iNewLength, int iNewWidth, int iNewHeight) {
With an appropriate constructor, we can do all three at once:
Box thisBox = new Box (10, 5, 25);