Npe ntawm chav kawm, uas yog cov ntaub ntawv-sensitive, hom primitive yog tus lej qis. … Vim hais tias, los ntawm lub rooj sib tham tag nrho cov chav kawm npe nyob rau hauv Java pib nrog ib tug loj tsab ntawv, thiab String yog ib chav kawm. (Lub npe tag nrho yog java.
Vim li cas String thiaj li sau hauv Java?
Txoj hlua yog qhov loj vim nws yog chav kawm, zoo li Object, tsis yog hom qub zoo li boolean lossis int (lwm hom koj zaum hla dhau). Raws li cov chav kawm, txoj hlua ua raws li Naming Convention rau Java tau thov los ntawm Sun.
Vim li cas String S yog peev?
nws yog vim Java tsis yog hom lus OO tiag tiag tab sis (ua tsaug) ib hom lus uas tso cai rau siv cov txheej txheem qub, uas yog ze rau cov hlau (tsis zoo li C).
Vim li cas txoj hlua hom sib txawv tau tshaj tawm siv lub peev S?
1 Teb. Raws li tsab xov xwm archived ntawm Java's API, String yog Chav Kawm thiab, vim yog lub npe hu ua cov rooj sib tham, nws pib nrog Tsab Ntawv Peev. Ntawm qhov tod tes, int, suav tias yog hom qub thiab, vim tias tib qhov txuas, nws pib nrog cov ntawv qis dua.
S hauv Java String yog dab tsi?
Nyob rau hauv Java, txoj hlua yog ib qho khoom uas sawv cev rau qhov sib lawv liag ntawm cov nqi. String s=new String(ch); …