blob: 09a1b0badaceece950babbf62073e0c7c8d017e8 (
plain) (
tree)
|
|
object Test {
def prettyPrintArray(x: Array[_]) = println("Array(" + x.mkString(", ") + ")")
def main(args: Array[String]): Unit = {
prettyPrintArray(Array(1,2,3) :+ 4)
prettyPrintArray(1 +: Array(2,3,4))
prettyPrintArray(Array[Int]() :+ 1)
prettyPrintArray(1 +: Array[Int]())
}
}
|