Qhov twg ntawm cov kev hloov kho hauv qab no tsis tuaj yeem ua raws?

Cov txheej txheem:

Qhov twg ntawm cov kev hloov kho hauv qab no tsis tuaj yeem ua raws?
Qhov twg ntawm cov kev hloov kho hauv qab no tsis tuaj yeem ua raws?

Video: Qhov twg ntawm cov kev hloov kho hauv qab no tsis tuaj yeem ua raws?

Video: Qhov twg ntawm cov kev hloov kho hauv qab no tsis tuaj yeem ua raws?
Video: Nkauj Ntseeg Tawm Tshiab | “Vajtswv Haiv Neeg Cov Lus Taij Thov” 2024, Hlis ntuj nqeg
Anonim

Hloov kev nkag mus rau thaj chaw - Cov kev hloov pauv nkag public, pob, tiv thaiv, thiab ntiag tug tsis muaj txiaj ntsig rau lub peev xwm ntawm serialization los muab cov txiaj ntsig rau thaj teb.

Qhov twg ntawm cov kev hloov pauv hauv qab no Tsis tuaj yeem ua raws Mcq?

Kev piav qhia: Txhua qhov hloov pauv zoo li qub thiab hloov pauv hloov pauv tsis yog serialized.

Cov kev hloov pauv twg tsis tuaj yeem suav tau?

Ib qhov hloov pauv zoo li qub tsis tuaj yeem raug txheeb xyuas. Thaum de-serializing tus nqi tuaj yeem muaj rau Static variables yog tias tib yam yog muab thaum pib ntawm chav kawm hauv paus.

Dab tsi yog qhov tsis tuaj yeem ua hauv Java?

Yog tias koj cov khoom muaj kev siv (kev hloov pauv lossis ncaj qha) rau ib qho twgtsis yog cov khoom siv sib txuas, thiab qhov kev siv no tsis raug cim nrog cov lus tseem ceeb, ces koj cov khoom yuav tsis ua serializable. Feem ntau, nws tsis muaj kev nkag siab zoo rau serialize cov khoom uas tsis tuaj yeem rov qab siv tau thaum deserialized tom qab lossis lwm qhov.

Cov chav kawm Java twg tsis tuaj yeem ua tau?

Serializable interface. Qhov no tsuas yog ib qho cim interface uas qhia rau Java platform tias cov khoom yog serializable. Qee cov chav kawm theem xws li Xov, OutputStream thiab nws cov subclasses, thiab Sockettsis yog serializable.

Pom zoo: