Interface is the collection of methods with empty implementations and constants variables ( variables with static and final declarations ). All the methods in an interface are "public and abstract" by default. Since interfaces are abstract in nature so they can not be directly instantiated. To define the methods of an interface the keyword "implements" is used. Interfaces are similar to abstract classes but the major difference between these two is that interface have all the methods abstract while in case of abstract classes must have at least one abstract method.
Interfaces form a contract between the class and the outside world, and this contract is enforced at build time by the compiler.All the methods of the interface are implemented with the correct signature.Interfaces provides the ability to quickly connect classes or subsystems together and it also helps to isolate bugs because they limit the scope of a possible logic error to a given subset of methods.