/*来自
N o w J a v a . c o m - 时 代 Java*/
public class Main {
public static void main(String[] args) {
int[] test = new int[3];
System.out.println("Assigning 12 to the first element");
test[0] = 12; // index 0 is between 0 and 2. Ok
System.out.println("Assigning 9 to the fourth element");
// index 3 is not between 0 and 2. At runtime, an exception is thrown.
test[3] = 9;
/**
/**代码未完, 请加载全部代码(NowJava.com).**/
本文系作者在时代Java发表,未经许可,不得转载。如有侵权,请联系nowjava@qq.com删除。