Today I've been working with generic/parametric types in java () exercising my polymorphism understanding but since quite some time now I've been having an issue where I would have a generic class with a single method that returns a value, the reason is because I want to be able to call a method and by context been able to have different return types
class dummy <E>{
E value;
public E getValue(){
return value;
}
class dummy1 extends dummy<E>{
int value; …Run Code Online (Sandbox Code Playgroud)