use Runtime.getRuntime().maxMemory() instead of memoryclass
remove ununsed import