Home Help Java I The implement keyword



The implement keyword
Posted on: November 11, 2009 at 12:00 AM
In java programming language, the keyword implement specifies that the given class implements an interface.

The implement keyword

     

In java programming language, the keyword implement specifies that the given class implements an interface. Keywords are basically reserved words which have specific meaning relevant to a compiler.

Syntax: Here is the syntax for using the implement keyword in a class.

public class DominoPizza implements Pizza

{

/ write your code here

}

Note: Here are the some point that must be considered while implementing an interface (or interfaces) into a java class.

  • A class implementing an int erface must either implement all the methods of that interface otherwise known as the abstract class.
  • A class in java may extend at most one superclass because java does not allow multiple inheritance, by it may implement more than one interface.
  • Multiple inheritance in java is achieved through the interfaces.
  • When a class implements more than one interface then implement statement requires a comma-separated list of interfaces to be implement by that class.

Related Tags for The implement keyword:


More Tutorials from this section

Ask Questions?    Discuss: The implement keyword  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

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.