Yep! Integer is a subclass of Object, so Java assumes you're looking for a specific Integer object in your ArrayList, even if the actual subclass is something totally different, like Character.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yep!
Integer
is a subclass ofObject
, so Java assumes you're looking for a specificInteger
object in your ArrayList, even if the actual subclass is something totally different, likeCharacter
.