Interface

Februar 1, 2011 - Lesezeit: ~1 Minute

Definition

interface Testble
{
  final String='Konstante erlaubt';
  double TestDouble();
}

alle Funktionen public & abstract -> keine Modifizierer schreiben

Name  (I)NameDesInterfaceble

Implementieren

public Test implements Testble{
  @Override public double TestDouble(){
    return 0.0;
  }
}

instanceof - Schnittstelle enthalten?

Tags: