Java tutorial
//package com.java2s; public class Main { public static String showLog() { long l2 = (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1024L; Object[] arrayOfObject = new Object[1]; arrayOfObject[0] = Long.valueOf(l2); return l2 + ""; } }