⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 garbage.java

📁 this is a java application
💻 JAVA
字号:
class Garbage
{
	int index;
	static int count;
	Garbage()
	{
		count++;
		System.out.println("object "+count+" construct");
		setID(count);
	}
	
	void setID(int id)
	{
		index=id;
	}
	
	protected void finalize()
	{
		System.out.println("object "+index+" is reclaimed");
	}
	
	public static void main(String[] args)
	{
		new Garbage();
		new Garbage();
		new Garbage();
		new Garbage();
		System.gc();
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -