Skip to content

The cost of many small objects

A program stores ten million integers in a List<Integer> rather than an int[].

Why does this use several times more memory?