鏁扮粍鐨勫唴瀛樺浘

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了鏁扮粍鐨勫唴瀛樺浘相关的知识,希望对你有一定的参考价值。

鏍囩锛?a href='http://www.mamicode.com/so/1/sys' title='sys'>sys   string   pre   src   stat   alt   鏁扮粍   int   public   

 

 1 public class DemoArray {
 2     public static void main(String[] args) {
 3 
 4         int[] array = new int[3];
 5         System.out.println(array);
 6         System.out.println(array[0]);
 7         System.out.println(array[1]);
 8         System.out.println(array[2]);
 9         System.out.println("==========================");
11         array[1] = 10;
12         array[2] = 20;
13         System.out.println(array);
14         System.out.println(array[0]);
15         System.out.println(array[1]);
16         System.out.println(array[2]);       
18     }
19 }

 

 鎶€鏈浘鐗? src=

 

 

 1 package cn.itcast.day_04.demo_03;
 2 
 3 public class DemoArray {
 4     public static void main(String[] args) {
 5 
 6         int[] arrayA = new int[3];
 7         System.out.println(arrayA);
 8         System.out.println(arrayA[0]);
 9         System.out.println(arrayA[1]);
10         System.out.println(arrayA[2]);
11         System.out.println("==========================");
12 
13         arrayA[1] = 10;
14         arrayA[2] = 20;
15         System.out.println(arrayA);
16         System.out.println(arrayA[0]);
17         System.out.println(arrayA[1]);
18         System.out.println(arrayA[2]);
19         System.out.println("==========================");
20 
21         int[] arrayB = arrayA;
22         System.out.println(arrayB);
23         System.out.println(arrayB[0]);
24         System.out.println(arrayB[1]);
25         System.out.println(arrayB[2]);
26         System.out.println("==========================");
27 
28         arrayB[1] = 100;
29         arrayB[2] = 200;
30         System.out.println(arrayB);
31         System.out.println(arrayB[0]);
32         System.out.println(arrayB[1]);
33         System.out.println(arrayB[2]);
34         System.out.println("==========================");
35     }
36 }

 

鎶€鏈浘鐗? src=

以上是关于鏁扮粍鐨勫唴瀛樺浘的主要内容,如果未能解决你的问题,请参考以下文章

leetcode 4. 瀵绘壘涓や釜姝e簭鏁扮粍鐨勪腑浣嶆暟

浠嬬粛涓€涓瓧绗︿覆杞崲鐨勫嚱鏁扮粍SCMS_CONV

Android MVP + 娉涘瀷锛屽疄鐜颁簡鍙嬪ソVP浜や簰鍙夾ctivity娼滃湪鐨勫唴瀛樻硠闇茬殑浼樺寲

js 澶氫釜鏁扮粍鍙栧叾鐩稿悓鐨勫厓绱犲嵆瀛愰泦

鍚庣紑鏁扮粍