Java   View all facts   Glossary   Help
specification > interface
Next access unitmethod    Upaccess unit, specification    Previous access unitconstructor   

interface
(abstract data type)
subjectfact 
interfaceis a synonym of abstract data type2001-10-19 11:35:57.0
can contain abstract methodsadded by: JK, source: The Java Programming Language, 2001-10-19 11:36:59.0
can extend 1 or more interfaces    source: Sun Java Tutorial, 2001-10-19 11:36:59.0
cannot have any concrete methods or instance variables    source: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:36:59.0
defines a set of methodssource: Sun Java Tutorial, 2001-10-19 11:36:59.0
has definition In Java, a software module containing a description of a set of operations that certain classes must implement    source: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:36:59.0
has definition A named collection of method declarations (without implementations), may also include constant declarations (variables marked static and final)source: Sun Java Tutorial, modified by: Judy, reference: Tutorial, 2001-10-19 11:36:59.0
has 1 fully qualified name that includes its package nameadded by: JK, source: Sun Java Tutorial, 2001-10-19 11:36:59.0
has 1 simple name that does not include its package nameadded by: JK, source: Sun Java Tutorial, 2001-10-19 11:37:00.0
has example
public interface Drawable
{
public abstract Image drawImage();
public abstract Image drawImage(int height, int width);
public abstract Image drawBlackAndWhiteImage(int height, int width);
}
source: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:37:00.0
has part interface definitionadded by: JK, 2001-10-19 11:37:00.0
has purpose    source: Sun Java Tutorial, 2001-10-19 11:37:00.0
has syntax
public interface InterfaceName extends SuperInterfaces
{
InterfaceBody
}
added by: JK, source: Sun Java Tutorial, 2001-10-19 11:37:00.0
inherits all constants and methods from its superinterfaces    source: Sun Java Tutorial, 2001-10-19 11:37:00.0
is like a class except that it does not have any executable statements - it only contains abstract methods and class variables    source: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:37:00.0
is abstract by definition - the modifier is optional in the declarationadded by: JK, source: Java in a Nutshell, 2001-10-19 11:37:00.0
is a member of the default package unless its source file contains a package statementadded by: JK, source: Sun Java Tutorial, 2001-10-19 11:37:00.0
is only accessible to classes that are defined in the same package unless the interface is public    source: Sun Java Tutorial, 2001-10-19 11:37:00.0
is a subtopic of Interfaces2001-10-19 11:37:00.0
is compiled by the Java compiler into a .class fileadded by: JK, source: Teach Yourself Java 2 in 21 Days, 2001-10-19 11:37:00.0
is implemented by 1 or more classsource: Sun Java Tutorial, 2001-10-19 11:37:00.0
is a kind of access unitadded by: DS, 2001-10-19 11:37:00.0
is a kind of specificationadded by: DS, 2001-10-19 11:37:00.0
may have 1 or more superinterfacessource: Sun Java Tutorial, 2001-10-19 11:37:00.0
may have access modifier public, or noneadded by: JK, source: Java in a Nutshell, 2001-10-19 11:37:00.0
provides many of the same benefits as multiple inheritance    source: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:37:00.0
should be a member of 1 named packageadded by: JK, source: Sun Java Tutorial, 2001-10-19 11:37:00.0
access unithas access mode2001-10-19 11:35:59.0
syntactic unithas syntax rule
bold = mandatory
italic = non-terminal
normal font = optional
2001-10-19 11:38:04.0

Kinds of interface :

Next access unitmethod    Upaccess unit, specification    Previous access unitconstructor