debug.java

来自「thinking in java 经典书的习题答案 希望对大家有帮助啊」· Java 代码 · 共 27 行

JAVA
27
字号
// access/debug/Debug.java
// TIJ4 Chapter Access, Exercise 3, page 220
/* Create two packages: debug and debugoff, containing an identical class with a
* debug() method. The first version displays its String argument to the console,
* the second does nothing. Use a static import line to import the class into a test
* program, and demonstrate the conditional compilation effect.
*/

/* In directory access/debugoff:
* // access/debugoff/Debug.java
* package access.debugoff;
*
* public class Debug {
*	public static void debug(String s) { }
* }
*/

package access.debug;

public class Debug {
	public static void debug(String s) {
		System.out.println(s);
	}
}


⌨️ 快捷键说明

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