帮忙看看这个程序怎样运行。
编译过后,怎样运行?是自己输入年份和月份吗?import java.lang.Math;
public class SwitchDemo
{
public static void main(String[] args)
{
int year=Integer.parseInt(args[0]);
int month=Integer.parseInt(args[1]);
boolean flag=true;
int days=-1;
switch(month)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
days=31;
break;
case 4:
case 6:
case 9:
case 11:
days=30;
break;
case 2:
if(year%400==0||(year%4==0&&year%100!=0))
{
flag=true;
days=29;
}
else
{
flag=false;
days=28;
}
}
if(flag)
System.out.println(year+"年是闰年!");
else
System.out.println(year+"年是平年!");
System.out.println(year+"年"+month+"是"+days+"天。");
}
}