Skip to content

Commit b589f2e

Browse files
committed
Corrected package statement, fixed C-style array declaration warning
1 parent 670fc9f commit b589f2e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/com/codefortomorrow/intermediate/chapter10/solutions/twoDArrayPrograms.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
package com.codefortomorrow;
1+
package com.codefortomorrow.intermediate.chapter10.solutions;
22

33
public class twoDArrayPrograms{
44

55
public static void main(String[] args) {
66

77
// 1
8-
int a[][] = new int[4][6];
8+
int[][] a = new int[4][6];
99
int sum = 0;
1010
int max = Integer.MIN_VALUE;
1111
int min = Integer.MAX_VALUE;
@@ -31,7 +31,7 @@ public static void main(String[] args) {
3131
System.out.println();
3232

3333
// 2
34-
String b[][] = new String[3][3];
34+
String[][] b = new String[3][3];
3535
String str = "*";
3636
int ast = 0;
3737
for (int x = 0; x < 3; x++)
@@ -51,7 +51,7 @@ public static void main(String[] args) {
5151
System.out.println();
5252

5353
// 3
54-
int c[][] = new int[5][4];
54+
int[][] c = new int[5][4];
5555
for (int power = 2; power < 7; power++)
5656
{
5757
for (int base = 2; base < 6; base++)
@@ -72,7 +72,7 @@ public static void main(String[] args) {
7272
System.out.println();
7373

7474
//1
75-
int quiz[][] = new int [3][4];
75+
int[][] quiz = new int [3][4];
7676
for (int row = 0; row < quiz.length; row++)
7777
{
7878
for (int col = 0; col < quiz[row].length; col++)

0 commit comments

Comments
 (0)