- 链接地址:https://blog.csdn.net/reddy_Hu/article/details/107677174
- 链接标题:scala之模式匹配_yui hatano-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:7075
文章浏览阅读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