As you noticed, intValue
is not of much use when you already know you have an Integer
. However, this method is not declared in Integer
, but in the general Number
class. In a situation where all you know is that you have some Number
, you'll realize the utility of that method.