Java Vector or ArrayList for Primitives
问题 Is there an expandable array class in the Java API equivalent to the Vector or ArrayList class that can be used with primitives (int, char, double, etc)? I need a quick, expandable array for integers and it seems wasteful to have to wrap them in the Integer class in order to use them with Vector or ArrayList . My google-fu is failing me. 回答1: There is unfortunately no such class , at least in the Java API. There is the Primitive Collections for Java 3rd-party product. It's pretty dangerous to