当前位置: 技术问答>java相关
谁帮我看看这个程序有什么问题,新手求教
来源: 互联网 发布时间:2015-05-13
本文导语: /** * 打印日历! * @version 1.00 21 May 2002 * @author Lamyoyo Lin */ import corejava.*; public class Calendar { public static void main(String[] args) { int m; int y; if(args.length == 2) { m = Integer.parseInt(args[0]); y = Integ...
/**
* 打印日历!
* @version 1.00 21 May 2002
* @author Lamyoyo Lin
*/
import corejava.*;
public class Calendar
{
public static void main(String[] args)
{
int m;
int y;
if(args.length == 2)
{
m = Integer.parseInt(args[0]);
y = Integer.parseInt(args[1]);
}
else
{
Day today = new Day();//今天的日期
m = today.getMonth();
y = today.getYear();
}
Day d = new Day(y,m,1);
System.out.println(m + " " + y);
System.out.println("Sun Mon Tue Wed Thu Fri Sat");
for (int i = Day.SUNDAY;i
* 打印日历!
* @version 1.00 21 May 2002
* @author Lamyoyo Lin
*/
import corejava.*;
public class Calendar
{
public static void main(String[] args)
{
int m;
int y;
if(args.length == 2)
{
m = Integer.parseInt(args[0]);
y = Integer.parseInt(args[1]);
}
else
{
Day today = new Day();//今天的日期
m = today.getMonth();
y = today.getYear();
}
Day d = new Day(y,m,1);
System.out.println(m + " " + y);
System.out.println("Sun Mon Tue Wed Thu Fri Sat");
for (int i = Day.SUNDAY;i