⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 valuetest.java

📁 主要是对于JAVA的编程的基本语言 希望能够帮得上你。
💻 JAVA
字号:
package Operator;

/*
 In contrast to objects, primitive number assignments are stored as values. 
 In other words, primitive variables are assigned to unique values.
*/

class ValueTest {
   public static void main (String [] args) {
      int a = 10;
      System.out.println("a = " + a);
      int b = a;
      b = 30;
      System.out.println("a = " + a + "after change to b");
   }
}

/*
 The output from this program is the following:
 
 a = 10
 a = 10 after change to b 
 
 Notice this time the value of a stayed at 10. 
 This is because primitive types are assigned
 by value and not by reference. 
 (基本数据类型赋值是值传递而不是引用传递)
*/

⌨️ 快捷键说明

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