给你个例子作为参考
public static void main(String[] args) {
String[] LUNAR_HOLIDAY = new String[]{"0101", "0102", "0103", "0104", "0105", "0106", "0107", "0404", "0505", "08015"};
for (String s : LUNAR_HOLIDAY) {
if (s.equals("0505")) {
System.out.println(s + " " + 2);
} else {
System.out.println(s + " " + 0);
}
}
}