Video: Puas yog A thiab muaj nyob hauv Java?
2024 Tus sau: Lynn Donovan | [email protected]. Kawg hloov kho: 2023-12-15 23:47
Hauv Java , a Muaj -Ib qho kev sib raug zoo kuj tseem hu ua kev sib xyaw. Hauv Java , a Muaj -Ib qho kev sib raug zoo tsuas yog txhais tau tias piv txwv ntawm ib chav kawm muaj ib qho kev siv rau ib qho piv txwv ntawm lwm chav kawm lossis lwm qhov piv txwv ntawm tib chav kawm. Piv txwv li, ib lub tsheb muaj ib engine, aub muaj ib tail.
Tom qab ntawd, ib tug kuj yuav nug, puas muaj ib tug?
Hauv kev tsim database, object-oriented programming thiab tsim (saib object oriented program architecture), muaj-a (has_a or muaj ib ) yog ib qho kev sib raug zoo uas ib yam khoom (feem ntau hu ua cov khoom tsim, lossis ib feem / cov khoom siv / cov tswv cuab) "tsim" (yog ib feem lossis cov tswv cuab ntawm) lwm yam khoom (hu ua cov khoom sib xyaw
Ib yam li ntawd, muaj A thiab yog kev sib raug zoo hauv oops? Ib qho ntawm qhov zoo ntawm Object-Oriented programming lus yog code rov siv dua. Object oriented programming feem ntau txhawb 4 hom kev sib raug zoo uas yog: qub txeeg qub teg, koom haum, muaj pes tsawg leeg thiab aggregation. Tag nrho cov no kev sib raug zoo yog raws li "yog" kev sib raug zoo , " muaj -ib" kev sib raug zoo thiab "ib feem ntawm" kev sib raug zoo.
Hais txog qhov no, qhov txawv ntawm IS A thiab muaj kev sib raug zoo li cas?
Hauv OOP, IS - A kev sib raug zoo yog qub txeeg qub teg. Qhov no txhais tau tias, cov chav kawm me nyuam yog ib hom niam txiv chav kawm. A HAS-A kev sib raug zoo yog dynamic (khiav lub sij hawm) khi thaum qub txeeg qub teg yog ib qho zoo li qub (sib sau lub sij hawm) khi. Yog tias koj tsuas yog xav rov siv cov cai thiab koj paub tias ob qho tib si tsis zoo siv cov khoom sib xyaw.
Puas yog A thiab muaj kev sib raug zoo hauv Python?
Inheritance qauv dab tsi hu ua ib yog a kev sib raug zoo . Qhov no txhais tau hais tias thaum koj muaj chav kawm Derived uas tau txais los ntawm chav kawm Base, koj tsim a kev sib raug zoo qhov twg Derived yog ib tug tshwj xeeb version ntawm Base. Cov chav kawm yog sawv cev raws li lub thawv nrog lub npe chav kawm nyob rau saum toj.
Pom zoo:
Muaj pes tsawg theem ntawm indirection nyob rau hauv pointers koj muaj peev xwm muaj nyob rau hauv ib qho kev tshaj tawm?
Koj puas tuaj yeem muaj nyob rau hauv ib qho kev tshaj tawm? cov lus teb yog "tsawg kawg 12." txhawb ntxiv. ntawm saj, tab sis muaj qhov txwv. Muaj ob theem ntawm kev taw qhia (tus taw tes rau tus taw tes rau ib yam dab tsi) yog qhov ntau
Yuav ua li cas yog ib tug txheej txheem nyob rau hauv lub operating system dab tsi yog ib tug xov nyob rau hauv lub operating system?
Ib tug txheej txheem, nyob rau hauv cov nqe lus yooj yim tshaj, yog ib tug executingprogram. Ib tug los yog ntau tshaj threads khiav nyob rau hauv cov ntsiab lus ntawm cov txheej txheem. Ib tug xov yog ib qho tseem ceeb chav tsev uas theoperating system faib lub sij hawm processor. Lub threadpool feem ntau yog siv los txo tus naj npawb ntawm cov ntaub ntawv thov thiab muab kev tswj hwm ntawm cov neeg ua haujlwm threads
Qhov chaw nyob ntawm lub cev thiab qhov chaw nyob qhov chaw nyob yog dab tsi?
Qhov sib txawv yooj yim ntawm Logical thiab lub cev chaw nyob yog qhov chaw nyob Logical yog tsim los ntawm CPU hauv kev xav ntawm ib qho kev pab cuam. Ntawm qhov tod tes, qhov chaw nyob ntawm lub cev yog qhov chaw nyob uas muaj nyob hauv lub cim xeeb. Cov txheej txheem ntawm txhua qhov chaw nyob uas tsim los ntawm CPU fora program hu ua Logical Address Space
Muaj pes tsawg cov khoom nyob hauv ib byte pes tsawg tus nibbles nyob hauv ib byte?
Txhua 1 lossis 0 hauv tus lej binary raug hu ua me ntsis. Los ntawm qhov ntawd, ib pawg ntawm 4 cov khoom hu ua nibble, thiab 8-ntsis ua ib byte. Bytes yog ib tug zoo nkauj buzzword thaum ua hauj lwm nyob rau hauv binary
Dab tsi yog qhov chaw nyob thiab lub cev nyob hauv OS?
Qhov sib txawv yooj yim ntawm Logical thiab lub cev chaw nyob yog qhov chaw nyob Logical yog tsim los ntawm CPU hauv kev xav ntawm ib qho kev pab cuam. Ntawm qhov tod tes, qhov chaw nyob ntawm lub cev yog qhov chaw nyob uas muaj nyob hauv lub cim xeeb. Cov txheej txheem ntawm txhua qhov chaw nyob uas tsim los ntawm CPU rau ib qho kev pab cuam hu ua Logical Address Space