Be careful when you try to use ArrayList.remove() to delete specific elements using a boxed Integer rather than a primitive int -- you probably won...
For further actions, you may consider blocking this person and/or reporting abuse
Ahh, that is interesting. So...if it's not an
intindex then it's looking for a specificObject? This seems like a good Java interview question - pretty tricky IMO.Yep!
Integeris a subclass ofObject, so Java assumes you're looking for a specificIntegerobject in your ArrayList, even if the actual subclass is something totally different, likeCharacter.