Created
February 27, 2017 05:55
-
-
Save darionyaphet/f1b61fa95870d49e6e79f0afaea16633 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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