Java syntax: Difference between revisions

Content deleted Content added
Functional interfaces and lambda expressions: Add link to @FunctionalInterface annotation.
m upd link
Line 1,238:
 
====Inheritance====
Classes in Java can only [[Inheritance (computerobject-oriented scienceprogramming)|inherit]] from ''one'' class. A class can be derived from any class that is not marked as <code>final</code>. Inheritance is declared using the <code>extends</code> keyword. A class can reference itself using the <code>this</code> keyword and its direct superclass using the <code>super</code> keyword.
 
<syntaxhighlight lang="java">