Update MemoryDemo.java

Demostrate totalMemory(),freeMemory() and gc()