Cov txheej txheem:
Video: Peb puas tuaj yeem sib piv ob daim duab qhia hauv Java?
2024 Tus sau: Lynn Donovan | [email protected]. Kawg hloov kho: 2023-12-15 23:47
Los ntawm lub neej ntawd, HashMap . equals() txoj kev sib piv ob hashmap los ntawm tus nqi tseem ceeb. Nws txhais tau tias ob leeg hmoob piv txwv yuav tsum muaj ib yam tseem ceeb-tus nqi khub thiab ob qho tib si yuav tsum muaj qhov loj me. Qhov kev txiav txim ntawm tus nqi tseem ceeb ua tau yuav txawv thiab ua tsis ua si hauv lub luag haujlwm kev sib piv.
Ntawm no, koj ua li cas piv ob qhov tseem ceeb ntawm daim ntawv qhia?
Txoj hauv kev kom yog los sib piv cov duab qhia txog tus nqi sib npaug yog:
- Txheeb xyuas tias daim duab qhia chaw yog tib qhov loj (!)
- Tau cov yuam sij ntawm ib daim ntawv qhia.
- Rau txhua tus yuam sij los ntawm qhov teeb tsa koj tau rov qab, xyuas tias tus nqi muab los ntawm txhua daim ntawv qhia rau tus yuam sij ntawd yog tib yam (yog tias tus yuam sij tsis tuaj ntawm ib daim ntawv qhia, qhov ntawd yog tag nrho tsis ua tiav ntawm kev sib npaug)
Ib yam li ntawd, kuv yuav piv ob lub npe hauv Java li cas? Koj ua tau piv ob array cov npe siv cov equals() method of the ArrayList chav kawm, txoj kev no lees txais a lis khoom raws li ib qho parameter, piv nws nrog cov khoom tam sim no, nyob rau hauv cov ntaub ntawv ntawm qhov sib tw nws rov qab muaj tseeb thiab yog tias tsis yog nws rov qab tsis tseeb.
Hais txog qhov no, koj ua li cas piv ob daim ntawv qhia hash?
Rau Sib piv Hashmaps hauv java, mas ob txoj kev siv xws li hashCode() thiab equals(). Yog hashCode ntawm ob daim ntawv qhia yog sib npaug ces peb tuaj yeem mus rau qhov equals() method, as hashCode of ob HashMaps tuaj yeem sib npaug tab sis tsis muaj tseeb hais tias lawv sib npaug thiab.
Peb puas tuaj yeem sib piv ob daim duab qhia hauv C ++?
Cov daim ntawv qhia ::key_comp() yog ib qho haujlwm hauv STL hauv C++ uas xa rov qab ib daim qauv ntawm kev sib piv khoom siv los ntawm lub thawv uas piv yuam sij. Rov qab tus nqi: Txoj kev no rov qab cov kev sib piv khoom siv los ntawm lub thawv uas piv yuam sij. // C++ program los ua qauv qhia daim ntawv qhia ::key_comp().
Pom zoo:
Peb puas tuaj yeem khaws cov ntaub ntawv sib txawv hauv ArrayList hauv C#?
Yog lawm, koj tuaj yeem khaws cov khoom sib txawv hauv ArrayList tab sis, zoo li pst tau hais, nws yog qhov mob rau lawv tom qab. Yog tias cov txiaj ntsig muaj feem cuam tshuam rau qee txoj hauv kev koj yuav zoo dua los sau cov chav kawm los tuav lawv
Peb puas tuaj yeem sib txuas cov hlua thiab cov lej hauv Java?
Concatenate hlua rau tus nqi int hauv Java. Txhawm rau txuas ib txoj hlua rau tus nqi int, siv tus neeg teb xov tooj sib txuas. int val = 3; Tam sim no, txhawm rau sib txuas ib txoj hlua, koj yuav tsum tshaj tawm txoj hlua thiab siv tus neeg teb xov tooj +
Koj puas tuaj yeem qhia Outlook daim ntawv qhia hnub yam tsis muaj Exchange?
Qhia tawm Outlook daim ntawv qhia hnub yam tsis muaj Exchange. Sync2Cloud tso cai sib koom Outlook daim ntawv qhia hnub yam tsis muaj MicrosoftExchange. Nws tso cai rau kev sib koom ua ke ntawm koj daim ntawv qhia hnub (iCloud, Google lossis Office 365). Saib thiab tswj qhov lees txais kev qhia Calendar ntawm ib qho khoom siv oraccount
Daim duab qhia tseeb thiab daim duab ntaiv sib txawv li cas?
Daim duab tseeb yog cov duab kos duab hloov kho uas muaj cov ntaub ntawv hais txog. 123 38-9) Cov kab hluav taws xob hauv teb tau txawv li cas los ntawm kev xaim hluav taws xob ntawm feem ntau cov duab? Cov kab hluav taws xob hauv teb yog ib txwm kos nrog cov kab sib tsoo thaum lub Hoobkas xaim yog ib txwm kos nrog cov kab khoom
Koj puas tuaj yeem kos ib daim duab peb sab uas muaj ib kab ntawm symmetry?
(a) Yog, peb tuaj yeem kos ib daim duab peb sab isosceles uas tsuas muaj 1 kab ntawm symmetry