<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    SportyBabe
    The opposite of dream
    posts - 6,  comments - 3,  trackbacks - 0

    Generics
    作用: communicate the element type of a collection to the compiler to avoid the unsafe downcasting.
    和C++中parameterized types的作用相似 (在Thinking in java中Bruce Eckel提到過)。
    Example: ArrayList<String> stringList =  new ArrayList<String>(); 
                 ......Add elements to the stringList......
                 String string1 = stringList.get(0);

    For-each Loop
    作用:if you need not operate the designated elements within the iterator or array, for-each loop will bring the beautiful code for you and reduce the error opportunities.
                eliminates the drudgery and error-proneness of iterators and index variables when iterating over collections and arrays.
    Example: String[] stringArray;
                for (String individualString: stringArray) {...}

    I noticed that most of Russian guys in TopCoder use the for-each loop.

    Autoboxing/Unboxing
    作用:automates to box/unbox between primitive types and the appropriate wrapper types.
    Example:  ArrayList<Integer> intList = new ArrayList<Integer>();
                  int total = intList.get(0);

    Typesafe Enums
    作用:replace int Enum Pattern (e.g. public static final int XXX = 0;) to represent a fixed set of constants.
    Example: public enum WEEKENDS { SAT, SUN };
                 private final WEEKENDS weekend;

    Varargs
    作用:automates and hides the passing process in the case of the arbitrary number of parameters;
          
    eliminates the need for manually boxing up argument lists into an array when invoking methods that accept variable-length argument lists.
           Varargs can be used only in the final argument position.
    Example: public static String format(String pattern, Object... arguments);

    Static Import
    作用:avoid qualifying static members with class names without the shortcomings of the "Constant Interface antipattern."
    Once the static members have been imported, we don't have to use "ClassName.staticMemeber" in our classes.
    Example: import static java.awt.Math.*; 

    Metadata
    作用:avoid writing boilerplate code by enabling tools to generate it from annotations in the source code.
    Example: public @interface XXX {...}

    More information about "J2SE 5.0 new features" could be found at java.sum.com.

    posted on 2005-11-28 14:00 SportyBabe 閱讀(332) 評論(0)  編輯  收藏 所屬分類: Java

    只有注冊用戶登錄后才能發(fā)表評論。


    網(wǎng)站導(dǎo)航:
     

    公告

    目前在讀的書:
    The timeless way of building

    Thinking in Java

    Bad boy


    <2005年11月>
    303112345
    6789101112
    13141516171819
    20212223242526
    27282930123
    45678910

    常用鏈接

    留言簿(1)

    隨筆分類

    隨筆檔案

    文章分類

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 亚洲色中文字幕无码AV| 亚洲一区二区三区在线视频| 亚洲AV无码成人精品区蜜桃| 一本久久A久久免费精品不卡| 免费欧洲毛片A级视频无风险| 国产午夜亚洲精品不卡| 亚洲AV无码成H人在线观看| 国产亚洲情侣久久精品| gogo全球高清大胆亚洲| 国产亚洲综合久久| 亚洲伊人久久大香线蕉综合图片 | 亚洲AV无码一区二区三区DV| 亚欧免费无码aⅴ在线观看| 亚洲色欲色欲综合网站| 在线永久免费的视频草莓| 亚洲国产精品免费观看 | 亚洲AV无码一区二区大桥未久| 成年女人视频网站免费m| 亚洲成a∨人片在无码2023| 看全色黄大色大片免费久久| 无人视频免费观看免费视频| 亚洲欧洲成人精品香蕉网| 色欲国产麻豆一精品一AV一免费| 亚洲熟妇无码爱v在线观看| 女人与禽交视频免费看| 国产产在线精品亚洲AAVV| 国产亚洲精品拍拍拍拍拍| 久久久久免费看成人影片| 日韩亚洲人成在线| 亚洲第一永久AV网站久久精品男人的天堂AV | 久久久久国产精品免费看| 亚洲无成人网77777| 日本高清免费不卡视频| 中国一级特黄的片子免费 | 一级毛片a免费播放王色电影 | 国产亚洲av人片在线观看| 国产电影午夜成年免费视频| 亚洲av日韩综合一区二区三区| 国产亚洲精品激情都市| 无码国产精品一区二区免费 | 亚洲精品美女久久7777777|