Some of the classes provided by the programming language are not optimized for use on mobile devices. For example, the generic HashMap implementation can be quite memory inefficient because it needs a separate entry object for every mapping.