Java OOPC - Interface
.png)
Interface Interface is keyword use in Java .Instead of using ‘class’ keyword using ‘interface’ we can create interface. As the same way creating a class we can create interface also. Interface is also a class, but interface is not a class it work same as a class. Difference between class and interface ,interface can not create object because of that interface even can not create constructor, But after Java 8 we can use constructors. We can not do multiple inheritance. means that we can not inherit more than one super class from sub class. Using extends we can not do multiple inheritance. But using the implements we can do multiple inheritance. Implements what inheritance do using the interface. So the purpose of using the interface is do the multiple inheritance. As we know we can not create the objects to the interfaces but using the upcasting we can create objects. In here object generate side be the class indeedly, then that cla...