forked from crossoverJie/JCSprout
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTwoArray.java
More file actions
41 lines (28 loc) Β· 836 Bytes
/
TwoArray.java
File metadata and controls
41 lines (28 loc) Β· 836 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
40
41
package com.crossoverjie.algorithm;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Function: ε¨δΊη»΄ζ°η»δΈε€ζζ―ε¦εε¨ζ₯ζΎηζ°ε
*
* @author crossoverJie
* Date: 09/02/2018 22:19
* @since JDK 1.8
*/
public class TwoArray {
private final static Logger LOGGER = LoggerFactory.getLogger(TwoArray.class);
public static void main(String[] args) {
int[][] matrix = new int[][]{
{1, 2, 8, 9},
{2, 4, 9, 12},
{4, 7, 10, 13},
{6, 8, 11, 15},
{7, 9, 12, 16}
};
// ζ°η»ηθ‘ζ°
int rows = matrix.length;
// ζ°η»θ‘ηεζ°
int cols = matrix[1].length;
LOGGER.info(String.valueOf(rows));
LOGGER.info(String.valueOf(cols));
}
}