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.10 Şub 2022
Read moreWhat do you mean by interface?
1a : the place at which independent and often unrelated systems meet and act on or communicate with each other the man-machine interface. b : the means by which interaction or communication is achieved at an interface. 2 : a surface forming a common boundary of two bodies, spaces, or phases an oil-water interface.
Read moreWHAT IS interface and example?
An interface is a description of the actions that an object can do … for example when you flip a light switch, the light goes on, you don’t care how, just that it does. In Object Oriented Programming, an Interface is a description of all functions that an object must have in order to be an “X”.
Read more