I can almost hear someone say, "how do you know X is more specific than Y?"
Simple answer is, if X extends Y directly or indirectly, X is more specfic than Y. If there is no direct or indirect inheritance relationship between X and Y, both are equally specific.
So Integer is more specific than Number and Number is more specific than Object. But String and Integer(or Number) are equally specific.