A friend and I are studying Java. We were looking at interfaces today and we got into a bit of an discussion about how interfaces are used. The example code my friend showed me contained this: Where IVehicle is an interface that’s implemented in both the car and bike classes. When defining a method that accepts IVehicle as a parameter
Tag: polymorphism
Higher-kinded generics in Java
Suppose I have the following class: Now I want to introduce a generic argument, abstracting over the use of Expr: But Eclipse doesn’t like this: The type F is not generic; it cannot be parametrized with arguments <Fix<F>> Is this possible at all or have I overlooked something that causes this specific instance to break? Some background information: in Haskell