Final types

If you use the final modifier on a type, the type cannot be inherited. For example, if a Gosu class is final, you cannot create a subclass of that class.

The final modifier is implicit with enumerations. An enumeration is an encapsulated list of enumerated constants. Enumerations are implemented like Gosu classes in most ways. No Gosu code can subclass an enumeration.

See also