No, it works the other way round. A Number IS‑AN Object, but it is often the case that An Object ISN'T‑A Number. When you declare a Foo<Number>, and initialise in correctly as you did, the compiler takes that as meaning that all its arguments will be type Number. If you try to add an Object, that Object ISN'T‑A Number, so the compiler goes into strict mode, as you told it to, and rejects that Object. You may only pass anything to a parametrised object if the compiler is sure you are passing something of the correct type.
And welcome to the Ranch
Does this tiny ad smell okay to you?
Create Edit Print & Convert PDF Using Free API with Java