In java programming language the keyword interface in java is used to declare and define an interface. Keywords are basically reserved words which have specific meaning relevant to a compiler. The keyword implement is used to implement an interface by a class. Interfaces in java are abstract means they can not be instantiated directly. Interfaces should be implemented by any class in order to instantiate them.
Syntex: Here is the syntax that displays how to declare and define an interface.
[visibility] interface InterfaceName [extends other interfaces] {
|
Note: Here are some points that must consider about an interface.
java.lang.Object, is the exceptional case because it
is the root class
of the Java type
system). If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: The interface keyword View All Comments
Post your Comment