Created
October 3, 2021 19:30
-
-
Save lucaspolo/adb0c68ed44663b5624eaf4005440f84 to your computer and use it in GitHub Desktop.
This file contains 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 CasamentoDePadroes extends App { | |
var x: Any = "Desconhecido porém string"; | |
x match { | |
case "oi" => println("Hello") | |
case "Scala" => println("Hello Scala") | |
case value: String => println(s"This is a string: $value") | |
case _ => println("A strange object") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment