GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Documentation Here

This view

  • Original page
  • New address

GeezerVison is showing robbmalexander.github.io — robbmalexander.github.io

Inheritance & Interfaces

Inheritance

  • In Java, subclasses of a class (“superclass” relative to the subclass) inherit state and behavior, such as having access to all methods defined for the parent class.

  • Each class may have only one superclass “above” it in inheritance, but has no limit to the number of subclasses “below”.

  • Subclass delcaration syntax: class SubclassName extends SuperclassName {/*subclass code block*/}

Interfaces

  • In Java, an interface is a specified list of object behaviors.

  • Interface syntax: interface ClassName { void methodToImplementLater(int parameterName); }

  • An implemented class must define each method declared in the interface.

  • Implementation syntax: class ImplementedClassName implements ClassName { /*code block*/ void methodToImplementLater (int parameterName) { /*method code block*/ }

Packages

  • A Java package is a grouping of related or otherwise interacting classes and interfaces.

  • The Application Programming Interface package for Java contains very many commonly used classes (Documentation Here)

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.