early, late binding?
That's not the point. The bottom line is that Java does not support the covariance of arguments in inheritance. Because B inherits А , and Double inherits Number , the method() in child class B does not overlap the parent. Otherwise, it would violate the principle of substitution of Barbara Liskov .
Imagine that you still have a class C this type:
class С extends A{ void method(Integer a){ System.out.println ("INTEGER"); } }
Since Integer inherited from Number , such a declaration would also be covariant in the argument. Now let's mentally try to execute the code:
A a = new С(); a.method (2.0);
And there would be a problem. From the point of view of class A, argument 2.0 is adequate, but from the point of view of class C, it is not. Therefore, to ensure the safety of Java types, it does not allow overriding parent methods in child classes in this way.