Skip to content

Commit e5a84e4

Browse files
committed
The2DArrays
1 parent 0eb49f3 commit e5a84e4

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

Diff for: data-structures/The2DArrays.java

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import java.util.Arrays;
2+
3+
public class The2DArrays {
4+
public static void main(String[] args) {
5+
char[][] board = new char[3][3];
6+
7+
for (int i = 0; i < 3; i++) {
8+
for (int j = 0; j < 3; j++) {
9+
board[i][j] = '-';
10+
}
11+
}
12+
13+
System.out.println(Arrays.deepToString(board));
14+
}
15+
}
16+
17+
// java The2DArrays.java

Diff for: data-structures/TheArrays.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import java.util.Arrays;
22

3-
public class TheArrays {
3+
public class Arrays {
44
public static void main(String[] args) {
55
String[] colors = new String[5];
66
colors[0] = "Purple";

0 commit comments

Comments
 (0)