Why do we use an Interface? It is used to achieve total abstraction . Since java does not support multiple inheritances in the case of class, by using an interface it can achieve multiple inheritances. It is also used to achieve loose coupling.
Why do we use an Interface? It is used to achieve total abstraction . Since java does not support multiple inheritances in the case of class, by using an interface it can achieve multiple inheritances. It is also used to achieve loose coupling.