Dab tsi yog qhov kev zam Java Lang?
Dab tsi yog qhov kev zam Java Lang?

Video: Dab tsi yog qhov kev zam Java Lang?

Video: Dab tsi yog qhov kev zam Java Lang?
Video: Yog Rov Tig Tau Qub Kev By Nkauj noog Hawj 2024, Hlis ntuj nqeg
Anonim

Chav kawm java ua . Chav kawm Kev zam thiab nws cov subclasses yog ib daim ntawv ntawm Throwable uas qhia txog cov xwm txheej uas ib daim ntawv thov tsim nyog yuav xav ntes. Saib Ntxiv: yuam kev. Kev zam () Tsim ib qho Kev zam tsis muaj cov lus qhia ntxaws.

Ntawm no, dab tsi yog txhais los ntawm kev zam hauv Java?

Txhais : Ib kev zam yog ib qho xwm txheej, uas tshwm sim thaum lub sij hawm ua tiav ntawm ib qho kev pab cuam, uas cuam tshuam qhov kev khiav hauj lwm ntawm qhov kev pab cuam cov lus qhia. Thaum ib qho yuam kev tshwm sim nyob rau hauv ib txoj kev, tus txheej txheem tsim ib yam khoom thiab muab nws tawm mus rau lub runtime system. Qhov block ntawm code no hu ua ib kev zam tus tuav.

Ib tug kuj yuav nug, vim li cas kev zam raug siv hauv Java? Kev zam : Kev zam qhia tau hais tias ib daim ntawv thov tsim nyog yuav sim ntes. Tag nrho kev zam thiab hom kev ua yuam kev yog cov chav kawm sub ntawm chav kawm Throwable, uas yog cov chav kawm ntawm hierarchy. Ib ceg yog coj los ntawm Kev zam . Chav kawm no yog siv rau tshwj xeeb tej yam kev mob uas cov neeg siv cov kev pab cuam yuav tsum tau ntes.

Kuj paub, dab tsi yog qhov tshwj xeeb hauv Java nrog piv txwv?

Runtime yuam kev yog hu ua ib Kev zam yuam kev. Nws yog ib qho xwm txheej uas cuam tshuam qhov kev khiav haujlwm ntawm kev ua haujlwm. Piv txwv rau kev zam yog, arithmetic kev zam , Nullpointer kev zam , Faib los ntawm xoom kev zam , lwm. Exceptions nyob rau hauv Java yog ib yam dab tsi uas tawm ntawm developers tswj.

Java lang yog dab tsi?

Java . lang pob hauv Java . Muab cov chav kawm uas yog qhov tseem ceeb rau kev tsim qauv Java programming lus. Cov chav kawm tseem ceeb tshaj plaws yog Object, uas yog lub hauv paus ntawm chav kawm hierarchy, thiab Class, piv txwv ntawm cov chav kawm thaum lub sijhawm khiav.

Pom zoo: