> Online tutorial : interfaces in java
Showing posts with label interfaces in java. Show all posts
Showing posts with label interfaces in java. Show all posts

interfaces in java

Interfaces
My apple trees will never get across
And eat the cones under his pines, I tell him.
He only says “Good Fences Make Good Neighbors.”
ending Wall
  • AN interface declaration introduces a new reference type whose members are
    classes, interfaces, constants and abstract methods. This type has no implementation,
    but otherwise unrelated classes can implement it by providing implementations
    for its abstract methods.
  • A nested interface is any interface
    whose declaration occurs within the body of another class or interface. A top-level interface is an interface that is not a  nested interface.
  • We distinguish between two kinds of interfaces -  
    1)normal interfaces 
    2)annotation types.
  • A class may be declared to directly implement one or more interfaces, meaning
    that any instance of the class implements all the abstract methods specified by
    the interface or interfaces.
  • A <a href="http://gan.doubleclick.net/gan_click?lid=41000000035563578&pubid=21000000000397534">class   </a> necessarily implements all the interfaces that its direct superclasses and direct superinterfaces do. This (multiple) interface inheritance allows objects to support (multiple) common behaviors without sharing any implementation.