I encountered with a strange issue. I don't understand why this code doesn't work:
public static <Type1 extends Integer, Type2 extends Double >
Object addition(Type1 first, Type2 second)
{
return second * first;
}
The compiler claims Operator * cannot be applied to Type2,Type1
. But that types extends Integer and Double which has + operator defined for them. So i really don't understand this