In Java, boxed numbers are instances of classes, such as java.lang.Integer  or  java.lang.Double , that wrap or "box" the respective primitive types: int,  double, etc. They were designed to allow Java apps to pass around numbers as objects and, more importantly, to store numbers in the common collections, such as java.util.ArrayList,  java.util.HashMap, etc. The need to store numbers in lists and maps is very common. To satisfy it, the JDK developers had two choices:

  • Provide specialized collections, i.e. lists and maps, for every primitive type and their combinations. For example, this could include IntArrayListObjectToDoubleHashMap,  IntToObjectLinkedHashMap,  IntToLongConcurrentHashMap, etc.

    Source de l’article sur DZONE

L’assistance proposée par ANKAA PMO

ANKAA PMO présent depuis plus de 20 ans sur le marché des services IT, accompagne les DSI dans leur recherche de compétences pour des besoins de renforts en mode régie ou l’externalisation de projets.
Vous souhaitez plus d’information ? Cliquez ici


0 réponses

Laisser un commentaire

Participez-vous à la discussion?
N'hésitez pas à contribuer!

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *