I'm beginner in Java, I'm trying to compile some small program, can somebody explain me, what is my problem, thanks in advance:
public abstract class SumFunction<Y,X> {
public abstract Y op (Y y, X x);
}
public class sumStringToInt extends SumFunction{
public int op(int num, String s){
return s.length() + num;
}
}
errors
Multiple markers at this line
- The type sumStringToInt must implement the inherited abstract method SumFunction.op(Object,
Object)
- SumFunction is a raw type. References to generic type SumFunction<Y,X> should be
parameterized
edited
is it possible in Java inherit without instantiaion of Base class?, thanks in advance