assignit.java
来自「Java 入门书的源码」· Java 代码 · 共 17 行
JAVA
17 行
//Copyright (c) 1998, Arthur Gittleman
//This example is provided WITHOUT ANY WARRANTY either expressed or implied.
/* Declare two integer variables with initial values.
* Assign a new value to the second variable.
* Output the new value.
*/
public class AssignIt {
public static void main(String [] args) {
int number1 = 25;
int number2 = 12;
number2 = number1 + 15;
System.out.print("number2 is now ");
System.out.println(number2);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?