标签:style blog color java ar div new log
int y[] = new int[3]; y[0] = 1; y[1] = 2; y[2] = 3; int[] x = new int[] {1,2,3}; int[] x = {1,2,3};
String[][] x = {{"00","01"},{"10","11"}}; String[][] y = new String[2][2]; y[0][0] = "00"; y[0][1] = "01"; y[1][0] = "10"; y[1][1] = "11";
java.util.ArrayList a = new java.util.ArrayList(); a.add("Hi"); // add an element a.set(0, "Hello"); // change first element a.remove(0); // remove first element a.add("Hello World"); String s = (String)a.get(0); // Hello World
Java 语法 索引 ----- 数组(Arrays),布布扣,bubuko.com
标签:style blog color java ar div new log
原文地址:http://www.cnblogs.com/timba/p/3900446.html