特牛网址导航

scala之模式匹配_yui hatano-CSDN博客

网友收藏
文章浏览阅读1.9k次。匹配字符串import scala.util.Randomobject CaseDemo1 { val arr = Array("YoshizawaAkiho", "YuiHatano", "AoiSola") val name: String = arr(Random.nextInt(arr.length)) println(s"name is:$name") name match { case "YoshizawaAkiho" => println("吉泽")_yui hatano
标签:yui hatano