We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91624b1 commit 46127dbCopy full SHA for 46127db
1 file changed
TestArray.java
@@ -44,6 +44,7 @@ public static void main (String[] args) {
44
System.out.println("Converted List = " + convertedList);
45
46
//Test 2d Array:
47
+ //http://stackoverflow.com/questions/12231453/syntax-for-creating-a-two-dimensional-array
48
int[][] nums = new int[][]{
49
{},
50
{1},
@@ -54,5 +55,12 @@ public static void main (String[] args) {
54
55
for (int[] array : nums) {
56
System.out.println("Original array: " + Arrays.toString(array));
57
}
58
+ int[][] nums2 = new int[4][7];
59
+ for (int i = 0; i < nums2.length; ++i) {
60
+ for (int j = 0; j < nums2[i].length; ++j) {
61
+ System.out.print("(" + i + ", " + j + ")=" + nums2[i][j] + " ");
62
+ }
63
+ System.out.println("");
64
65
66
0 commit comments