無為

          無為則可為,無為則至深!

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            190 Posts :: 291 Stories :: 258 Comments :: 0 Trackbacks

          公告

          與有奉獻精神和分享精神的人做朋友!

          Locations of visitors to this page
          Subscribe by Anothr

          搜索

          •  

          積分與排名

          • 積分 - 581926
          • 排名 - 83

          最新評論

          閱讀排行榜

           import java.util.Calendar;

          import java.util.GregorianCalendar;

          public class CalTest {

          public static void main(String[] argv) {

          CalTest calTest = new CalTest();

          calTest.cal(2009, 11);

          }

          public void cal(final int year, final int month) {

          Calendar calendar = new GregorianCalendar();

          calendar.set(year, month-1, 1);

          int week = calendar.get(GregorianCalendar.DAY_OF_WEEK) - 1;

          int days = calendar.getActualMaximum(GregorianCalendar.DAY_OF_MONTH);

          System.out.println();

          System.out.println("日\t一\t二\t三\t四\t五\t六");

          for(int i = 0; i < week; i++) {

          System.out.println("\t");

          }

          for(int i = 1; i <= days; i ++) {

          System.out.print(i + "\t");

          if((week + i)%7 == 0) {

          System.out.println();

          }

          }

          }


          }


          運行效果:




          凡是有該標志的文章,都是該blog博主Caoer(草兒)原創,凡是索引、收藏
          、轉載請注明來處和原文作者。非常感謝。

          posted on 2009-11-06 20:49 草兒 閱讀(874) 評論(2)  編輯  收藏 所屬分類: JAVA WEB應用

          Feedback

          # re: Calender 2009-12-31 05:05 EllenbY22
          I guess that now men need <a href="http://www.primewritings.com">custom essay plus</a> about this good topic, because this is our business to supply you with the fantastic information connecting with <a href="http://www.primewritings.com/costs.php">costs</a>.   回復  更多評論
            

          主站蜘蛛池模板: 兰西县| 大连市| 黎川县| 禹城市| 石门县| 贵德县| 德安县| 库车县| 朝阳市| 当阳市| 汉阴县| 社会| 万荣县| 全南县| 平江县| 石渠县| 清新县| 黄平县| 邵阳县| 浮梁县| 鄂托克旗| 大厂| 吉林市| 红河县| 道孚县| 吉水县| 岚皋县| 阳江市| 阳泉市| 宜昌市| 报价| 黑龙江省| 湾仔区| 滕州市| 昭苏县| 河津市| 汉川市| 丹江口市| 凤凰县| 纳雍县| 碌曲县|