object MyClass {
def main(args: Array[String]): Unit = {
var rows = 3;
var cols = 4;
val arr = Array.ofDim[Int](rows, cols);
for {
i <- 0 until rows
j <- 0 until cols
} println(s"($i)($j) = ${arr(i)(j)}")
}
}
/*
run:
(0)(0) = 0
(0)(1) = 0
(0)(2) = 0
(0)(3) = 0
(1)(0) = 0
(1)(1) = 0
(1)(2) = 0
(1)(3) = 0
(2)(0) = 0
(2)(1) = 0
(2)(2) = 0
(2)(3) = 0
*/