![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e123. Creating an Array// An array of 10 ints. int[] ints = (int[])Array.newInstance(int.class, 10); // An array of 10 int-arrays. int[][] ints2 = (int[][])Array.newInstance(int[].class, 10); // A 10x20 2-dimenional int array. ints2 = (int[][])Array.newInstance(int.class, new int[]{10, 20});
e121. Getting the Length and Dimensions of an Array Object e122. Getting the Component Type of an Array Object e124. Expanding an Array e125. Getting and Setting the Value of an Element in an Array Object
© 2002 Addison-Wesley. |