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

📄 testex5.java

📁 JAVA编程思想第四版英文原版习题答案. pdf原版的
💻 JAVA
字号:
// interfaces.TestEx5.java
// TIJ4 Chapter Interfaces, Exercise 5, page 320
// Create an interface containing three methods, in its own package. Implement it
// in another package.
/* Solution includes, in package interfaces.ex5:
* package interfaces.ex5;
*
* public interface Ex5 {
*	void sayOne();
*	void sayTwo();
*	void sayThree();
* }
*/
import interfaces.ex5.*;

public class TestEx5 implements Ex5 {
	public void sayOne() { System.out.println("one"); }
	public void sayTwo() { System.out.println("two"); }
	public void sayThree() { System.out.println("three"); }
	public static void main(String[] args) {
		TestEx5 x = new TestEx5();
		x.sayOne();
		x.sayTwo();
		x.sayThree();
	}
}

⌨️ 快捷键说明

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