摘要: 初识Java(三) switch语句中的变量类型可以是: byte、short、int或者char. 从Java SE7开始支持字符串类型 case标签必须为字符串常量或字面量 //switch判断字符串是将字符串转为哈希值再判断 String name = "孤星"; switch (name){ 阅读全文
posted @ 2021-02-25 09:35 孤星寒 阅读(55) 评论(0) 推荐(0)