The
interface type
is used to specify methods that classes using the interface must implement. These methods are created with the
interface keyword followed by a name and a code block. Their naming convention is the same as for classes, with the first letter of each word capitalized.
When an interface isn’t nested inside another type, its access level can be either package-private or public, just like any other top-level member.
Interface Members
The code block for an interface can, first of all, contain signatures for instance methods. These methods don’t ...