Koj tseem tuaj yeem siv cov cai tsis raug cai yam tsis tau hloov pauv, tab sis tag nrho cov ntsiab lus ntawm deprecating ib txoj kev / chav kawm yog qhia rau cov neeg siv paub tias tam sim no muaj txoj hauv kev zoo dua ntawm kev siv nws, thiab hais tias yav tom ntej tso tawm cov cai tsis txaus siab yuav raug tshem tawm.
Peb puas tuaj yeem siv txoj kev tsis lees paub?
8 Teb. Qhov tseem ceeb deprecated yog ceeb toom rau koj raws li tus tsim tawm tias thaum txoj kev / chav kawm / dab tsi yog muaj thiab ua haujlwm nws tsis yog qhov zoo tshaj plaws los ua nws. … Koj tseem tuaj yeem siv yam tsis raug txiav tawm - tab sis koj yuav tsum saib seb vim li cas lawv thiaj li raug txiav tawm ua ntej thiab saib seb txoj kev tshiab ntawm kev ua zoo dua rau koj.
Koj puas tuaj yeem siv API tsis lees paub?
A API deprecated yog ib qho uas koj tsis pom zoo siv lawm, vim muaj kev hloov pauv hauv API. Txawm hais tias cov chav kawm tsis raug tso cai, cov txheej txheem, thiab cov teb tseem raug siv, lawv yuav raug tshem tawm hauv kev siv yav tom ntej, yog li koj yuav tsum tsis txhob siv lawv hauv cov cai tshiab, thiab yog tias ua tau rov sau cov lej qub tsis txhob siv lawv.
Koj ua li cas khij ib txoj hauv kev uas tsis muaj nyob hauv Java?
To kos ib txoj hauv kev uas tsis tau tso tseg peb tuaj yeem siv the JavaDoc @deprecated tag. Nov yog qhov peb tau ua txij thaum pib ntawm Java. Tab sis thaum muaj kev txhawb nqa metadata tshiab qhia rau Java lus peb tuaj yeem siv cov lus piav qhia. Cov lus piav qhia rau kev kos cim raws li qhov tsis txaus ntseeg yog @Depreated.
Yog deprecated lub ntsiab lus Java?
Ib yam li ntawd, thaum ib chav kawm lossis txoj kev raug tso tseg, nws txhais tau tias tias chav kawm lossistxoj kev tsis suav tias tseem ceeb lawm. Nws yog qhov tsis tseem ceeb, qhov tseeb, uas nws yuav tsum tsis txhob siv ntxiv lawm, vim tias nws yuav tsis muaj nyob rau yav tom ntej. … Lub peev xwm los kos ib chav kawm lossis txoj hauv kev ua "tsis pom zoo" daws qhov teeb meem.