java语言的科学与艺术-编程练习7.4
摘要:
import java.lang.Runtime;import acm.program.*;public class GCTest extends ConsoleProgram { public void run() { Runtime myRuntime = Runtime.getRuntime(); long oldMemory = myRuntime.freeMemory(); for(int i = 0; i < 10000; i++){ new Rational(1); } myRunt... 阅读全文