package com.hnsw.app; public class SwitchDemo01 { public static void main(String[] args) { String weekday = "星期日"; switch (weekday){ case "星期一" : System.out.println("加班写bug"); break; case "星期二" : System.out.println("请求大爷帮忙"); break; case "星期三" : System.out.println("今晚啤酒,小龙虾,小烧烤"); break; case "星期四" : System.out.println("帮助女程序员解决bug"); break; case "星期五" : System.out.println("今天吃鸡"); break; case "星期六" : System.out.println("与王介绍的小芬相亲"); break; case "星期日" : System.out.println("郁郁寡欢,准备上班"); break; default: System.out.println("数据有误"); } } }
06-07
995
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
02-28
1700
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)