package calendar;



import java.util.Calendar;



public class Program {



	public static void main(String[] args) 

	{

		int []days = new int [42];

		

		

		Calendar cal = Calendar.getInstance();

		

		cal.set(2013,10-1,1); //10-1 = 10월 (0부터시작)

		int week = cal.get(Calendar.DAY_OF_WEEK);

		

		for(int i=0; i<31; i++)

			days[i+week-1]= i+1;

		

		

		

		System.out.printf("%d\n\n",week);

		

		for(int i=0, n=1; i<42; i++, n++)

		{

			System.out.printf("%2d\t",days[i]);

			if(n%7==0)

				System.out.println();

		}

		

				

		

	}

	

}



+ Recent posts