What is interface in java ?

Interface in Java: Interface is used for achieving full abstraction in java. An interface is like a template that we can use in our classes.In other words, Interfaces form a contract between the class and the outside world, and this contract is enforced at build time by the compiler.