Skip to content

Instantly share code, notes, and snippets.

@darionyaphet
Created February 27, 2017 05:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darionyaphet/f1b61fa95870d49e6e79f0afaea16633 to your computer and use it in GitHub Desktop.
Save darionyaphet/f1b61fa95870d49e6e79f0afaea16633 to your computer and use it in GitHub Desktop.
object MatchExample {
def main(args: Array[String]): Unit = {
val key = "3"
key match {
case "1" => println("1")
case "2" => println("2")
case _ => println("default")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment