Home [Kotlin] Make a simple 2-dimensional matrix
Post
Cancel
Preview Image

[Kotlin] Make a simple 2-dimensional matrix

간단한 2차원 배열을 만드는 방법이 있다.

1
2
3
4
5
6
7
8
fun main() {
    val row = 5
    val col = 4
    val matrix = Array(row) { IntArray(col) }
    matrix.forEach { rows ->
    	println(rows.toList())
    }
}

References

This post is licensed under CC BY 4.0 by the author.

맥에서 VSCode 한글 입력오류 해결

What's new in Spring Boot 2.6