Ob chav parseDouble hauv Java yog dab tsi?
Ob chav parseDouble hauv Java yog dab tsi?
Anonim

Cov parseDouble () txoj kev Java Ob chav kawm yog ib txoj hauv kev ua hauv Java uas rov los tshiab ob npaug pib rau tus nqi sawv cev los ntawm txoj hlua uas tau teev tseg, raws li ua los ntawm tus nqi ntawm txoj kev ntawm chav kawm Ob npaug . Rov qab hom: Nws rov e ob npaug tus nqi sawv cev los ntawm txoj hlua sib cav.

Ib yam li ntawd, tib neeg nug, ob txhais li cas hauv Java?

ob npaug : Cov ob npaug hom ntaub ntawv yog a ob npaug -precision 64-ntsis IEEE 754 ntab taw tes. Nws qhov ntau ntawm qhov muaj nuj nqis yog dhau ntawm qhov kev sib tham no, tab sis yog tau teev nyob rau hauv Floating-Point Hom, Hom, thiab Qhov Tseem Ceeb ntawm ntu Java Lus Specification. Rau tus lej lej, hom ntaub ntawv no yog feem ntau yog qhov kev xaiv ua ntej.

Ib yam li ntawd, dab tsi yog ob qho zoo infinity hauv Java? Txawm hais tias nws yog tsis yooj yim sua rau lub computer kom cia sawv cev tus nqi ntawm tsis kawg hauv nco, lub Java " ob npaug "thiab "float" data-type reserves ob lub qhov nyob hauv nws qhov chaw nyob uas nkag siab los ntawm lub computer xa mus rau zoo thiab tsis zoo tsis kawg.

Kuj Paub, dab tsi yog ob npaug Min_value hauv Java?

Ob npaug . MIN_VALUE sawv cev rau tus nqi 21074. Qhov no yog tus nqi subnormal, thiab nws yog tag nrho cov nqi tsawg tshaj plaws uas a ob npaug tuaj yeem sawv cev. Tus nqi subnormal muaj 0 ua ntej lub ntsiab lus binary: 0.

Yuav ua li cas hloov ib txoj hlua mus rau ob zaug hauv Java?

Muaj peb txoj hauv kev hloov a Txoj hlua rau ob npaug tus nqi hauv Java , Ob npaug . parseDouble() txoj kev, Ob npaug . valueOf() txoj kev thiab los ntawm kev siv tshiab Ob npaug () constructor thiab tom qab ntawd khaws cov khoom tshwm sim rau hauv ib qho qub ob npaug teb, autoboxing hauv Java yuav hloov a Ob npaug ob leeg rau ob npaug primitive nyob rau hauv tsis muaj sij hawm.

Pom zoo: