import java.util.Calendar;
public class h{
public static void main(String[] args){
Calendar c=Calendar.getInstance();
c.setFirstDayOfWeek(Calendar.ALL_STYLES);
c.set(Calendar.YEAR,2005);
c.set(Calendar.MONTH,7);
display(c);
System.out.println();
System.out.print("日"+" "+"一"+" "+"二"+" "+"三"+" "+"四"+" "+"五"+" "+"六");
System.out.println();
System.out.print(" **"+" ");
int[] a=new int[31];
int i;
for(i=0;i<a.length;i++){
a[i]=i+1;
System.out.print(a[i]+" ");
if(i%7==0)
{
System.out.println( );
}
}
}
static void display(Calendar c){
String months[]={"1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"};
String days[]={"","星期一","星期二","星期三","星期四","星期五","星期六","星期日"};
System.out.print(c.get(Calendar.YEAR)+"年");
System.out.print(months[c.get(Calendar.MONTH)]);
//System.out.print(c.get(Calendar.DATE)+"日");
}
}