A variable of type Number can be assigned a reference of type Number or a subclass thereof. You are assigning 5000, What's that? It is an int literal. So using the concept of autoboxing the compiler converts the int to an Integer wrapper object which is a subclass of Number. Cool, what?