freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

java程序執(zhí)行內(nèi)存分析(編輯修改稿)

2025-06-15 17:34 本頁面
 

【文章內(nèi)容簡介】 (5, 6)。()。 o radius: o radius:→ x:→5 y:→6 x: y: c1:xxx c2:xxx x:5 y:6 i:5 i:6 r: heap stack ((p1))。 o radius: x:5 y:6 x: y: c1:xxx p1:xxx p:xxx x y stack heap true static關(guān)鍵字的使用 ? public class Cat{ ? private static int sid=0。 ? private String name。 ? int id。 ? Cat(String name){ ? =name。 ? id=sid++。 ? } ? public void info{ ? (My name is +name+ NO.+id)。 ? } ? public static void main(String[] args){ ? =100。 ? =new Cat(mimi)。 ? =new Cat(pipi)。 ? ()。 ? ()。 ? } ? } static關(guān)鍵字的使用 stack heap data seg sid:100→101→102 id:100 name id:101 name mimi:xxx pipi:xxx mimi pipi name name 類的繼承 student Person name age school stack heap 子類 父類 Java權(quán)限修飾符 修飾符 類內(nèi)部 同一個(gè)包 子類 任何地方 private yes default yes yes protectcd yes yes yes public yes yes yes yes super和 this的使用 cc:xxx valeu value this super 子類 父類 Stu s1=new Stu(C,s1)。 pers name location school this super heap beijing C s1 s1 name school n l school name location data seg stack hashcodes table hashcodes table 對象 對象 對象 對象 對象 每一個(gè)對象都有獨(dú)一無二的 hashcodes,通過它可以找到所在對象的位置 對象轉(zhuǎn)型 casting(TestAnimals) ? class Animal{} ? class Dg extends Animal{} ? Animal a=new Animal()。// ? a=new Dg()。// ? Dg d1=(Dg)a。// 對象轉(zhuǎn)型 casting(TestAnimals) Animal a Animal name furcolor 程序中把 a當(dāng)成一只普通的 Animal,不能訪問 Dg中的成員 Dg 不能訪問 表明 實(shí)質(zhì) 只能訪問作為父類的那部分成員 Dg d1 動態(tài)綁定和多態(tài) (TestPolymoph) Cate c name:catname eyeColor:blue name:l1 Anima pet lady l1 實(shí)質(zhì)上指向 code seg Anima enjoy Cate enjoy Do enjoy 根據(jù)實(shí)際對象類型來調(diào)用 方法 星際的多態(tài)應(yīng)用 父類 GameObject draw() 繼承 使用多態(tài) 異常的概念 ? public void someMethod() ? throws SomeException{ ? if(someCondition()){ ? throw new SomeException(錯(cuò)誤原因 )。 ? } ? } 聲明該方法可能拋出的異常 構(gòu)造并拋出異常對象 拋出異常 ? try{ ? someMethod()。 ? }catch(SomeException e){ ? //異常處理代碼; ? } 調(diào)用該方法時(shí)試圖捕捉異常 定義處理異常的代碼 異常的分類 Throwable Error Exception RuntimeException 可拋出的 系統(tǒng)錯(cuò)誤,處理不了 能處理的錯(cuò)誤 經(jīng)常出的錯(cuò)誤,可以不 catch 必須得 catch的異常 運(yùn)行時(shí)異常 非運(yùn)行時(shí)異常 method() throws SomeException
點(diǎn)擊復(fù)制文檔內(nèi)容
范文總結(jié)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1