-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExercise146.java
More file actions
39 lines (31 loc) · 790 Bytes
/
Exercise146.java
File metadata and controls
39 lines (31 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
public class Exercise146
{
public static void main(String[] args)
{
boolean[][] a1 =
{
{true, true, false}, {false, true, false}
};
String print = "";
for (int row = 0; row < a1.length; row = row + 1)
{
System.out.println(java.util.Arrays.toString(a1[row]));
for (int column = 0; column < a1[0].length; column = column + 1)
{
if (a1[row][column] == true) {
print = "*";
}
else {
print = "_";
}
System.out.println("row: " + row + " column " + column + " element " + print);
}
}
// int[] row1= {1, 1, 0};
// int[] row2= {0, 1, 0};
// int[][] a2 =
// {
// row1, row2
// };
}
}