An interface must be declared with the keyword interface. An interface is 100% pure abstract class that's mean an interface can have only abstract method, no concrete methods exists. A single class can implement many interfaces. Interface methods are by default public and abstract, you can explicitly declare these modifiers which is optional. Interface can have constants which are implicitly public, static and final and it declaration is optional in any combination. An abstract class can implement an interface. A class can able to extend only one class but it can implements many interfaces. An interface can extends one or more other interfaces. Interface cannot extends a class. Interface methods must not declare static. Interface have all methods abstract so it must not marked final, strictfp, or native.
Posted on: July 1, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles