Generic Interfaces

Java-Generic Interfaces

Generic Interfaces Generics also work with interfaces. Thus, you can also have generic interfaces. Generic interfaces are specified just like generic classes. For example : The MyInterface is a generic interface that declares the method called myMethod( ). In general, a generic interface is declared in the same way as is a generic class. In this case, the … Read more…