Interface as a type in Java?
Let’s declare two interfaces and a class that implements them both: interface I1 { } interface I2 { } class C implements I1, I2 { } objects can have multiple types In the following code, it can be seen that a C instance has the type of C as well as I1 and I2: C … Read more