re: The int vs. Integer pitfall of Java's ArrayList.remove() VIEW POST

VIEW PARENT COMMENT VIEW FULL DISCUSSION
 

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.

code of conduct - report abuse