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

📄 automaticconstructor.java

📁 java编程思想第四版习题答案
💻 JAVA
字号:
// initialization/AutomaticConstructor.java
// TIJ4 Chapter Initialization, Exercise 7, page 167
/* Create a class without a constructor, and then create an object of that
* class in main() to verify that the default constructor is automatically
* synthesized.
*/

class Aso {
	void bark() {System.out.println("woof");}
}

public class AutomaticConstructor {
	public static void main(String[] args) {
		Aso a = new Aso();
		a.bark();
	}
}

⌨️ 快捷键说明

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