Пример #1
0
 public static String memoryToString() {
   DecimalFormat fmt = new DecimalFormat("0.0");
   return "Memory: "
       + fmt.format(RUNTIME.maxMemory() / 1048576D)
       + "MByte maximum, "
       + fmt.format(RUNTIME.totalMemory() / 1048576D)
       + "MByte total, "
       + fmt.format(RUNTIME.totalMemory() / 1048576D)
       + "MByte free";
 }