编辑代码

public class DemoSwitch01{
	public static void main(String[] args){
		java.util.Scanner s = new java.util.Scanner(System.in);
		System.out.print("请输入性别,1为男,0为女:");
		int xingbie = s.nextInt();
		System.out.print("请输入天气情况,1为雨天,0为睛天:");
		int tqsj = s.nextInt();
		String shuchu = "数据错误!";
		switch(xingbie){
		case 0:
			shuchu = "下雨了,帅哥记得带上小黑伞哦!";
			break;
		case 1:
			shuchu = "下雨了,靓女记得带上小花伞哦!";
			break;
		}
		switch(tqsj){
		case 0:
			shuchu = "今天天气不错,是睛天哦,靓女出门记得擦防晒霜哦!";
			break;
		case 1:
			shuchu = "今天天气不错,是睛天哦,兄弟们,出去溜达去!";
		default:
			
		}
		System.out.println("请正确输入数值");
	}	
}