Content deleted Content added
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags |
→Implementing interfaces in a class: fix broken ref |
||
Line 56:
... implements ''InterfaceName''[, ''another interface'', ''another'', ...] ...
[[Class (software)|Classes]] may implement an interface. For example
<syntaxhighlight lang="java">
public class Lion implements Predator {
Line 62:
@Override
public boolean chasePrey(Prey p) {
// Programming to
}
Line 91:
</syntaxhighlight>
Interfaces are commonly used in the Java language for [[Callback (computer science)|callbacks]],<ref>{{cite web |last1=Mitchell |first1=John D. |date=1996-06-01 |df=mdy |url=
===Subinterfaces===
|