Java View all facts Glossary Help |
specification > interface |
interface (abstract data type) | ||||
subject | fact |
interface | is a synonym of abstract data type | |
can contain abstract methods | ||
can extend 1 or more interfaces | ||
cannot have any concrete methods or instance variables | ||
defines a set of methods | ||
has definition In Java, a software module containing a description of a set of operations that certain classes must implement | ||
has definition A named collection of method declarations (without implementations), may also include constant declarations (variables marked static and final) | ||
has 1 fully qualified name that includes its package name | ||
has 1 simple name that does not include its package name | ||
has example public interface Drawable | ||
has part interface definition | ||
has purpose
| ||
has syntax public interface InterfaceName extends SuperInterfaces | ||
inherits all constants and methods from its superinterfaces
| ||
is like a class except that it does not have any executable statements - it only contains abstract methods and class variables | ||
is abstract by definition - the modifier is optional in the declaration | ||
is a member of the default package unless its source file contains a package statement | ||
is only accessible to classes that are defined in the same package unless the interface is public | ||
is a subtopic of Interfaces | ||
is compiled by the Java compiler into a .class file | ||
is implemented by 1 or more class | ||
is a kind of access unit | ||
is a kind of specification | ||
may have 1 or more superinterfaces | ||
may have access modifier public, or none | ||
provides many of the same benefits as multiple inheritance | ||
should be a member of 1 named package | ||
access unit | has access mode | |
syntactic unit | has syntax rule bold = mandatory |
Kinds of interface :
Next access unit: method Up: access unit, specification Previous access unit: constructor