Please enable JavaScript.
Coggle requires JavaScript to display documents.
Implementing Interfaces (Interfaces (rules (1 - Cannot be instantiated…
Implementing Interfaces
Interfaces
-
-
-
-
public abstract interface CanBurrow{
public static final int MINIMUM_DEPTH = 2;
public abstract int getMaximumDepth();
}
-
-
-
-
rules
-
-
-
4 - Cannot be private, protected and final. Only public or default access.
5 - Methods cannot be private, protected or final. Only public and abstract.
Inheriting a interface
rules
1 - A interface or abstract class inherits all of abstract methods from interface that extends or implements respectively.
-
Interface Variables
1 - Assumed to be public, static and final. Other modifier will trigger a compiler error
-
-
-
-