thisuseexample2.java

来自「JAVA编程思想源代码 值得一下 很难找的」· Java 代码 · 共 24 行

JAVA
24
字号
package chapter6;

public class ThisUseExample2 {

	private int x;

	public void setX(int x) {
		this.x = x;
	}

	public int getX() {
		return x;
	}

	public static void main(String[] args) {
		ThisUseExample2 tue = new ThisUseExample2();
		tue.setX(5);
		int x = tue.getX();
		System.out.println("x = " + x);

	}

}

⌨️ 快捷键说明

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