Java Lang ExceptionInInitializerError yog dab tsi?
Java Lang ExceptionInInitializerError yog dab tsi?

Video: Java Lang ExceptionInInitializerError yog dab tsi?

Video: Java Lang ExceptionInInitializerError yog dab tsi?
Video: Java Program to Find ASCII Value of a char 2024, Kaum ib hlis
Anonim

Cov ExceptionInInitializerError yog sub-chav kawm ntawm LinkageError chav kawm thiab qhia tias qhov kev zam tsis tau tshwm sim tau tshwm sim hauv qhov pib zoo li qub lossis tus pib rau qhov hloov pauv zoo li qub. Cov ExceptionInInitializerError raug pov tseg thaum JVM sim thauj cov chav kawm tshiab.

Tib neeg kuj nug, InvocationTargetException yog dab tsi?

Cov InvocationTargetException yog ib qho kev kuaj xyuas uas qhwv ib qho kev zam pov tseg los ntawm tus txheej txheem hu los yog tus tsim qauv. Qhov kev zam no yog hu ua qhov ua rau thiab tuaj yeem nkag tau los ntawm txoj kev getCause. Yog xav paub ntxiv txog kev xav hauv Java, thov mus saib nplooj ntawv no.

Ib yam li ntawd, dab tsi yog qhov pib zoo li qub hauv Java? Cov static pib yog a zoo li qub {} block code sab hauv java ua chav kawm, thiab khiav tsuas yog ib zaug ua ntej lub tus tsim los yog txoj kev tseem ceeb hu ua.

Yog li ntawd, Exception hauv xov lub ntsiab Java Lang NullPointerException txhais li cas?

NullPointerException yog RuntimeException. Hauv Java , tus nqi tshwj xeeb null ua tau raug xa mus rau qhov khoom siv. NullPointerException yog pov tseg thaum daim ntawv thov sim siv cov khoom siv uas muaj tus nqi null. Yog hom siv yog ib hom array, nkag mus lossis hloov kho cov slots ntawm qhov siv tsis tau.

Reflection API hauv Java yog dab tsi?

Kev xav hauv Java . Kev xav yog ib API uas yog siv los tshuaj xyuas lossis hloov tus cwj pwm ntawm txoj hauv kev, chav kawm, kev sib tshuam ntawm lub sijhawm ua haujlwm. Kev xav muab peb cov ntaub ntawv hais txog cov chav kawm uas ib yam khoom belongs thiab kuj cov txheej txheem ntawm cov chav kawm ntawv uas yuav tsum tau executed los ntawm kev siv cov khoom.

Pom zoo: