Dab tsi yog khub kwv tij hauv Java?
Dab tsi yog khub kwv tij hauv Java?

Video: Dab tsi yog khub kwv tij hauv Java?

Video: Dab tsi yog khub kwv tij hauv Java?
Video: Лучшие 15 часов Casio G Shock до $ 500 | Лучшие часы G-Shock ниже $ 500... 2024, Hlis ntuj nqeg
Anonim

“ tus khub khoom "yog qhov txuas ntxiv ntawm lub tswvyim ntawm" khoom ”:ib khoom uas yog a tus khub mus rau ib chav kawm tshwj xeeb, thiab yog li muaj kev nkag mus rau nws cov txheej txheem thiab cov khoom ntiag tug.

Tsis tas li ntawd, dab tsi yog tus khub khoom?

Ib khoom nrog tib lub npe raws li chav kawm hu ua a tus khub khoom . Hloov chaw, chav kawm yog tus khoom tus khub chav kawm. A tus khub chav kawm los yog khoom tuaj yeem nkag mus rau cov tswv cuab ntiag tug ntawm nws tus khub . Siv a tus khub khoom rau txoj kev thiab qhov tseem ceeb uas tsis yog tshwj xeeb rau cov piv txwv ntawm cov tus khub chav kawm.

Tsis tas li ntawd, dab tsi yog qhov khoom hauv Java? Yam khoom − Yam khoom muaj lub xeev thiab tus cwj pwm. Piv txwv li: Tus dev muaj lub xeev - xim, lub npe, yug thiab kev coj cwj pwm - wagging tus Tsov tus tw, barking, noj. Ib khoom yog ib qho piv txwv ntawm chav kawm. Chav Kawm - Ib chav kawm tuaj yeem txhais tau tias yog tus qauv / daim ntawv qhia dav dav uas piav qhia tus cwj pwm / hais tias khoom ntawm nws hom kev txhawb nqa.

Tsuas yog li ntawd, dab tsi yog ib qho khoom ua ke ntawm kotlin?

Txhua chav kawm tuaj yeem siv tau a tus khub khoom , uas yog ib khoom uas yog ib txwm muaj rau txhua qhov xwm txheej ntawm chav kawm ntawd. Thiab yog li nws yog, tab sis vim txoj kev Android lub moj khaum instantiate cov chav kawm, yog tias koj sim, koj yuav pom tias daim ntawv thov cuam tshuam qhov kev zam thaum nws pib.

Dab tsi yog qhov sib txawv ntawm cov khoom thaiv thiab cov khoom sib koom ua ke hauv Kotlin?

A Tus khub khoom yog pib thaum cov chav kawm loaded (feem ntau yog thawj zaug nws tau hais los ntawm lwm tus code uas yog raug tua) whereas Yam khoom Cov lus tshaj tawm tau pib ua haujlwm tsis txaus ntseeg, thaum nkag mus rau thawj zaug.

Pom zoo: