Creating and Using Objects

  • Class provides the blueprint for all objects (objects are created from the class)

  • There are three parts of creating an object: Declaration, Instantiation, and Initialization.

  • You can also declare a reference variable on its own line to refer to an object.

image

Extending Objects

  • Usually involved inheriting another object within classes and subclasses.

  • syntax: "class childclass extends parentclass"

  • syntax: "class parentclass extends in-built-object"

  • You can also extend two objects at once/.

image