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

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

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

    隨筆-295  評論-26  文章-1  trackbacks-0
    Stack. ?用來在ram中存放數據的地方 This ? lives ? in ? the ? general ? RAM ? (random-access ? memory) ? area, ? but????has ? direct ? support ? from ? the ? processor ? via ? its ? stack ? pointer. ? The ? stack ? pointer ? is ? moved ? down ? to ? create ? new ? memory ? and ? moved ? up ? to ? release ? that ? memory. ? This ? is ? an ? extremely ? fast ? and ? efficient ? way ? to ? allocate ? storage, ? second ? only ? to ? registers. ? The ? Java ? compiler ? must ? know, ? while ? it ? is ? creating ? the ? program, ? the ? exact ? size ? and ? lifetime ? of ? all ? the ? data ? that ? is ? stored ? on ? the ? stack, ? because ? it ? must ? generate ? the ? code ? to ? move ? the ? stack ? pointer ? up ? and ? down. ? This ? constraint ? places ? limits ? on ? the ? flexibility ? of ? your ? programs, ? so ? while ? some ? Java ? storage ? exists ? on ? the ? stack ? ?in ? particular, ? object ? handles ? ?Java ? objects ? are ? not ? placed ? on ? the ? stack. ? ?
    ? ?
    ? Heap. ? This ? is ? a ? general-purpose ? pool ? of ? memory ? (also ? in ? the ? RAM ? area) ? where ? all ? Java ? objects ? live. ? The ? nice ? thing ? about ? the ? heap ? is ? that, ? unlike ? the ? stack, ? the ? compiler ? doesn't ? need ? to ? know ? how ? much ? storage ? it ? needs ? to ? allocate ? from ? the ? heap ? or ? how ? long ? that ? storage ? must ? stay ? on ? the ? heap. ? Thus, ? there's ? a ? great ? deal ? of ? flexibility ? in ? using ? storage ? on ? the ? heap. ? Whenever ? you ? need ? to ? create ? an ? object, ? you ? simply ? write ? the ? code ? to ? create ? it ? using ? new ? and ? the ? storage ? is ? allocated ? on ? the ? heap ? when ? that ? code ? is ? executed. ? And ? of ? course ? there's ? a ? price ? you ? pay ? for ? this ? flexibility: ? it ? takes ? more ? time ? to ? allocate ? heap ? storage.??
    . 棧(stack)與堆(heap)都是Java用來在Ram中存放數據的地方。
    2. 棧的優勢是,存取速度比堆要快,僅次于直接位于CPU中的寄存器。但缺點是,存在棧中的數據大小與生存期必須是確定的,缺乏靈活性。另外,棧數據可以共享,詳見第3點。堆的優勢是可以動態地分配內存大小,生存期也不必事先告訴編譯器,Java的垃圾收集器會自動收走這些不再使用的數據。但缺點是,由于要在運行時動態分配內存,存取速度較慢。
    3. Java中的數據類型有兩種。基本類型(primitive types), 共有8種,即int, short, long, byte, float, double, boolean, char。存在于棧中。另一種是包裝類數據,如Integer, String, Double等將相應的基本數據類型包裝起來的類。這些類數據全部存在于堆中.

    大盤預測 國富論
    posted on 2007-08-20 13:08 華夢行 閱讀(164) 評論(0)  編輯  收藏

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


    網站導航:
     
    主站蜘蛛池模板: 亚洲色少妇熟女11p| 成年女人午夜毛片免费视频| 亚洲天堂男人影院| 亚洲av永久无码制服河南实里| 四虎影视永久免费视频观看| 青青在线久青草免费观看| 四虎国产精品永久免费网址| 天堂亚洲免费视频| 苍井空亚洲精品AA片在线播放| 亚洲一卡二卡三卡四卡无卡麻豆| 久久综合九九亚洲一区| 国产亚洲?V无码?V男人的天堂| 四虎永久免费观看| 好大好深好猛好爽视频免费| 免费毛片a在线观看67194| 99久久免费观看| 色猫咪免费人成网站在线观看| 国产无遮挡裸体免费视频在线观看 | 亚洲乱码中文字幕久久孕妇黑人 | 国产综合激情在线亚洲第一页| 亚洲一区二区三区播放在线| 久久亚洲AV成人无码软件| 久久久久久久久亚洲| 亚洲av无码一区二区三区网站 | 两性色午夜视频免费网| 日韩免费在线中文字幕| 曰批免费视频播放在线看片二| 久久亚洲中文无码咪咪爱| 亚洲国产精品无码久久久秋霞1| 国产成人精品日本亚洲11| 亚洲AV色吊丝无码| 亚洲小说图区综合在线| 亚洲色偷偷色噜噜狠狠99网| 亚洲精品无码mⅴ在线观看| 亚洲精品永久在线观看| 亚洲а∨精品天堂在线| 羞羞漫画在线成人漫画阅读免费| 国产精品亚洲AV三区| 麻豆一区二区三区蜜桃免费| 一级毛片aa高清免费观看| 中文字幕免费在线看电影大全 |