dosample1.java

来自「java实验报告书:其中包括实验代码以及说明等」· Java 代码 · 共 21 行

JAVA
21
字号
class Integer															//定义一个整型类
{
	int i;																	//i定义为整型类的成员变量
}
class DoSample1
{
  static int test(Integer a)                      
	{		                                      
	  return ++a.i;
	}
  public static void main(String args[])
	{
    Integer a=new Integer();
		a.i=1;
		System.out.println(test(a));
		System.out.println(test(a));
		System.out.println("This is the result:");
  }
} 

⌨️ 快捷键说明

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