package main
import "fmt"
func main() {
// 初始化方法1
row, column := 3, 4
var answer [][]int
for i := 0; i < row; i++ {
inline := make([]int, column)
answer = append(answer, inline)
}
fmt.Println(answer)
// 初始化方法2
answer1 := make([][]int, row)
for i := range answer1 {
answer1[i] = make([]int, column)
}
fmt.Println(answer1)
}
08-18
1217
09-15
2830