Monday, 29 August 2011

what is an interface?

Ans:

  • An interface is a named collection of method declarations and constant declarations. 

  • here we only declare the methods not a implementation. 

  • it's implemented by a class using implements keyword.


syntax:

        interface interface name{

           //declaration of methods and constants

         }

        class class name implements{

       

            //implementation codes

        }

0 comments:

Post a Comment