新手求带!麻烦大神帮看下!
程序代码:
package zs1; import javax.swing.JOptionPane; public class zs12 { public static void main(String args[]) { int month= 4; String season; if(month == 12 ||month == 1 ||month == 2); {season = "冬天";} else if(month == 3||month == 4||month == 5); {season = "春天";} else if(month == 6|| month== 7||month == 8); {season = "夏天";} else if(month == 9||month == 10||month == 10); {season = "秋天";} else {season = "不合法的月份";} JOptionPane.showMessageDialog(null,"四月是" + season +"."); System.exit(0); } }
报错:Syntax error on token "else", delete this token