object Demo { def main(args: Array[String]) { println(matchTest(3)) println("end....") } def matchTest(x: Int): String = x match { case 1 => "one" case 2 => "two" case _ => "many" } }
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more