Created
July 1, 2016 13:40
-
-
Save IT-Berater/af7498a1856877cc479b8f4dc6ed92c7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package de.wenzlaff.twpubnub; | |
import java.awt.Color; | |
public interface Farben { | |
// - default zuerst | |
// - Methode ist automatisch public | |
// - neue Default-Methoden können in bestehenden Interfaces definiert | |
// werden, ohne dass die direkt oder indirekt abgeleiteten Klassen angepasst | |
// werden müssen | |
// - Implementierung wird dann an alle abgeleiteten Interfaces und Klassen | |
// vererbt, sofern diese sie nicht mit einer eigenen Implementierung | |
// überschreiben. | |
default Color getDefaultFarbe() { | |
return Color.RED; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment