Articles

‘java.lang.System.getProperty()’ is a common API used by Java developers to read the System properties that are configured during application startup time. i.e. when you pass “-DappName=buggyApp” as your application’s startup JVM argument, the value of the ‘appName’ system property can be read by invoking the ‘java.lang.System.getProperty()’. Example:

Java

 

public static String getAppName() { String app = System.getProperty("appName");   return app;
}

Source de l’article sur DZONE

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