@@ -0,0 +1,1531 @@
+package com.java.hello;%0A%0Aimport java.text.DateFormat;%0Aimport java.text.SimpleDateFormat;%0Aimport java.util.Calendar;%0Aimport java.util.GregorianCalendar;%0Aimport java.util.Date;%0A%0Apublic class Solutions %7B%0A%09public void multi_9_9()%7B%0A%09%09for( int i = 1; i %3C 10; i++ )%7B%0A%09%09%09for( int j = i; j %3C 10 ; j++ )%7B%0A%09%09%09%09System.out.print( i + %22*%22 + j + %22=%22 + i * j + %22 %22 );%0A%09%09%09%7D%0A%09%09%09System.out.println( %22%22);%0A%09%09%7D%0A%09%09%0A%09%09return ;%0A%09%7D%0A%09%0A%09public int factorial( int n )%7B%0A%09%09if( n == 1 )%7B%0A%09%09%09return 1; %0A%09%09%7D %0A%09%09return n * factorial(n - 1);%0A%09%7D%0A%09%0A%09public int factorialItr( int n  )%7B%0A%09%09int ret = 1;%0A%09%09for( int i = 2; i %3C= n; i++ )%7B%0A%09%09%09ret *= i;%0A%09%09%7D%0A%09%09%0A%09%09return ret;%0A%09%7D%0A%09%0A%09public void visualCalendar()%7B%0A%09%09String temp = %222005-02-01%22;%0A%09%09DateFormat ft = new SimpleDateFormat( %22yyyy-MM-dd%22 );%0A%09%09try %7B%0A%09%09%09Date date = ft.parse(temp);%0A%09%09%09%0A%09%09%09Calendar cal = new GregorianCalendar();%09%09%0A%09%09%09cal.setTime(date);%0A%09%09%09//System.out.println(cal.get(Calendar.DAY_OF_WEEK));%0A%09%09%09//System.out.println(cal.getActualMaximum(Calendar.DATE));%0A%09%09%09int pre = cal.get(Calendar.DAY_OF_WEEK);%0A%09%09%09int max = cal.getActualMaximum(Calendar.DATE);%0A%09%09%09%0A%09%09%09System.out.println( %22%E6%97%A5%5Ct%E4%B8%80%5Ct%E4%BA%8C%5Ct%E4%B8%89%5Ct%E5%9B%9B%5Ct%E4%BA%94%5Ct%E5%85%AD%22 );%0A%09%09%09%0A%09%09%09for( int i = 1; i %3C pre; i++ )%7B%0A%09%09%09%09System.out.print(%22%5Ct%22);%0A%09%09%09%7D%0A%09%09%09for( int i = 1; i %3C 7-pre+2; i++ )%7B%0A%09%09%09%09System.out.print(i + %22%5Ct%22);%0A%09%09%09%7D%0A%09%09%09System.out.print(%22%5Cn%22);%0A%09%09%09%0A%09%09%09int j = 0;%0A%09%09%09for( int i = 7-pre+2; i %3C= max; i++ )%7B%0A%09%09%09%09System.out.print( i + %22%5Ct%22 );%0A%09%09%09%09j++;%0A%09%09%09%09if( j == 7 )%7B%0A%09%09%09%09%09System.out.println(%22%22);%0A%09%09%09%09%09j = 0;%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D catch (Exception e)%7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%7D%0A%7D%0A

Create calendar.java