atntest.java
来自「Thinking in Java 习题答案源码打包」· Java 代码 · 共 25 行
JAVA
25 行
// TIJ4 Chapter Object, Exericise 3, page 90
// object/ATNTest.java
// Find the code fragments involving ATypeName and turn them into a program
// that compiles and runs.
public class ATNTest {
public static void main(String[] args) {
class ATypeName {
int i;
double d;
boolean b;
void show() {
System.out.println(i);
System.out.println(d);
System.out.println(b);
}
}
ATypeName a = new ATypeName();
a.i = 3;
a.d = 2.71828;
a.b = false;
a.show();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?