File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/com/codefortomorrow/intermediate/chapter10/solutions Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
- package com .codefortomorrow ;
1
+ package com .codefortomorrow . intermediate . chapter10 . solutions ;
2
2
3
3
public class twoDArrayPrograms {
4
4
5
5
public static void main (String [] args ) {
6
6
7
7
// 1
8
- int a [][] = new int [4 ][6 ];
8
+ int [][] a = new int [4 ][6 ];
9
9
int sum = 0 ;
10
10
int max = Integer .MIN_VALUE ;
11
11
int min = Integer .MAX_VALUE ;
@@ -31,7 +31,7 @@ public static void main(String[] args) {
31
31
System .out .println ();
32
32
33
33
// 2
34
- String b [][] = new String [3 ][3 ];
34
+ String [][] b = new String [3 ][3 ];
35
35
String str = "*" ;
36
36
int ast = 0 ;
37
37
for (int x = 0 ; x < 3 ; x ++)
@@ -51,7 +51,7 @@ public static void main(String[] args) {
51
51
System .out .println ();
52
52
53
53
// 3
54
- int c [][] = new int [5 ][4 ];
54
+ int [][] c = new int [5 ][4 ];
55
55
for (int power = 2 ; power < 7 ; power ++)
56
56
{
57
57
for (int base = 2 ; base < 6 ; base ++)
@@ -72,7 +72,7 @@ public static void main(String[] args) {
72
72
System .out .println ();
73
73
74
74
//1
75
- int quiz [][] = new int [3 ][4 ];
75
+ int [][] quiz = new int [3 ][4 ];
76
76
for (int row = 0 ; row < quiz .length ; row ++)
77
77
{
78
78
for (int col = 0 ; col < quiz [row ].length ; col ++)
You can’t perform that action at this time.
0 commit comments