Traditional Culture Encyclopedia - The 24 Solar Terms - Calendar programming code of java program?

Calendar programming code of java program?

Public static void main(String[] args) {

calendar calendar = calendar . getinstance();

Calendar.set (calendar. Year 2065438+02);

Calendar.set (calendar. Month,1);

Calendar.set (calendar. Month/day,1);

int first = calendar.get(Calendar。 Day of the week)-1;

System. out . println(calendar . get(calendar . year)+" year "

+(calendar.get (calendar.month)+1)+"calendar");

system . out . println(" Day \ t 1 \ T2 \ T3 \ T4 \ t5 \ T6 ");

for(int I = 0; I'm < first; i++) {

system . out . print(" \ t ");

}

int maxDay = Calendar . getactualmaximum(Calendar。 Month day);

for(int I = 0; I & ltmaxdayi++)

if (first / 7 == 1) {

first = 0;

system . out . println();

}

System.out.print(i + 1

+(first/6 = = 1 | | I = = maxDay- 1? " ":" \ t "));

The first++;

}

}