i m trying to calculate the salary in abstract class(in which i m implementing one interface) and trying to extend that abstract class into another class and adding some incentive to that salary but when i m calcuting then it is showing '+' opertor is underifned with generic type
import java.util.List;
public abstract class SalaryInfo<T, V extends Number> implements info<T, V> {
T hours;
T rate;
T pay;
public void calculatePay(T hours, T rate) {
pay = hours * rate;
// Do your math with Integer class methods help
}
// return new Double(hours.doubleValue() * rate.doubleValue());
// System.out.println("pay is b :" +pay);
public void show() {
System.out.println("post is :");
}
}
package com.demo;
public interface info<T,V>
{
public void calculatePay(T hours, T rate);
public void perinfo(V empid,T empname );
public void display();
}