Qhov txawv ntawm Java5 thiab Java6

Qhov txawv ntawm Java5 thiab Java6
Qhov txawv ntawm Java5 thiab Java6

Video: Qhov txawv ntawm Java5 thiab Java6

Video: Qhov txawv ntawm Java5 thiab Java6
Video: Thov Txim Qhov Kuv Txav Deb Ntawm Koj (Official Music Video 2022) N. Vajxob Xyooj & N. Vanxay lauj 2024, Kaum ib hlis
Anonim

Java5 vs Java6

Java yog ib qho ntawm cov khoom siv dav dav siv cov lus hais lus programming, uas yog siv los ntawm software tsim kho mus rau kev txhim kho lub vev xaib niaj hnub no. Nws yog lub hom phiaj dav dav thiab cov lus programming ib txhij. Nws yog Ameslikas tsim los ntawm Sun Microsystems hauv 1995. James Gosling yog leej txiv ntawm Java programming lus. Oracle Corporation tam sim no muaj Java (tom qab yuav Sun Microsystems tsis ntev los no). Java yog hom lus uas muaj zog heev uas txhawb nqa ntau lub platform los ntawm Windows mus rau UNIX. Java muaj ntawv tso cai raws li GNU General Public License. Txij li thaum nws pib tso tawm xyoo 1995 (Java 1.0), nws tau loj hlob thiab tau dhau los ua cov lus tseem ceeb rau kev tsim cov ntawv thov hauv web. Java 6 yog nws qhov kev tso tawm ruaj khov tam sim no, thaum Java 5 yog qhov dhau los.

Java5

Java 5 (tseem hu ua Java Standard Edition 5.0 lossis J2SE 5 lossis J2SE 1.5), codenamed Tiger, tau tso tawm thaum lub Cuaj Hlis, 2004. Java 5 tau dhau nws lub neej, thiab lub hnub txhawb nqa rau nws tag rau lub Kaum Ib Hlis., 2009. Nws muaj 3200+ chav kawm thiab interfaces. Java 5 tau nthuav tawm ntau qhov hloov tshiab loj, xws li kev txhim kho lus (piv txwv li Cov Lus Qhia, Generics, Autoboxing, thiab txhim kho syntax rau looping) ntawm ntau lwm tus. Cov lus piav qhia yog ib lub tswv yim rau kev sau cov chav kawm nrog cov metadata yog li ntawd, lawv tuaj yeem siv los ntawm cov phiaj xwm metadata-paub. Generics yog ib qho txheej txheem ntawm kev qhia txog hom khoom rau cov khoom sau, xws li Arraylists, yog li ntawd hom kev nyab xeeb yog lav ntawm lub sijhawm sau. Autoboxing tso cai rau kev hloov pauv tsis siv neeg ntawm hom qub (piv txwv li int) thiab hom wrapper (piv txwv li Integer). Kev txhim kho syntax rau looping suav nrog kev txhim kho rau txhua lub voj rau kev mus los ntawm cov khoom ntawm array lossis collections comparatively yooj yim.

Java6

Java 6 (tseem hu ua Java Standard Edition 6.0 lossis Java SE 6 lossis Java 1.6), codenamed Mustang, tau tso tawm thaum Lub Kaum Ob Hlis, 2006. Kev kho tam sim no yog Hloov Kho 26, uas tau tso tawm rau lub Rau Hli, 2011. Nws muaj 3700+ chav kawm thiab interfaces. Nws tsom mus rau cov kev qhia tshwj xeeb tshiab thiab APIs suav nrog XML, Web Services, JDBC version 4.0, programming raws li Cov Lus Qhia, API rau Java compiler thiab Application client GUI. Tsis tas li ntawd, kev txhawb nqa rau cov laus version ntawm Windows (Win9x series) yuav raug tshem tawm pib los ntawm Kev Hloov Kho 7.

Qhov txawv ntawm Java5 thiab Java6 yog dab tsi?

Java 6 yog qhov ruaj khov tam sim no ntawm Java programming lus, thaum Java 5 yog nws cov version dhau los. Java 5 tau dhau los ua nws lub neej lub sijhawm, thiab tsis tau txais kev txhawb nqa los ntawm Sun ntxiv lawm. Txawm hais tias Java 5 ntxiv ntau qhov kev hloov pauv loj (xws li Autobxing) rau cov lus, Java 6 ntxiv cov yam ntxwv tseem ceeb ntxiv. Tshwj xeeb, Tsis zoo li Java 5, uas tsom mus ntxiv / txhim kho cov lus (syntax) nta, Java 6 ntxiv ntau yam kev txhim kho rau cov txheej txheem ntawm Java lus. Txawm hais tias, Java 5 tau qhia cov lus piav qhia, Java 6 tuaj nrog ntau hom annotations thiab APIs rau kev ua cov lus piav qhia (piv txwv li cov kev pabcuam hauv Web metadata rau Java Platform, Cov Lus Ceebtoom rau Java Platform, thiab Pluggable Annotation Processing API).

Ua tsaug rau tus tshiab compiler API ntxiv nrog Java 6, java compiler tam sim no tau txais thiab / lossis xa tawm mus rau qhov kev paub daws teeb meem ntawm cov ntaub ntawv kaw lus (cov kev pab cuam tuaj yeem hais qhia / txheej txheem compiler tso zis). Tsis tas li ntawd, Java 6 tau ntxiv kev txhim kho rau cov ntawv thov GUI muaj peev xwm hauv AWT (cov ntxaij vab tshaus nrawm dua thiab kev txhawb nqa rau lub tais tais) thiab SWING (zoo dua rub-thiab-nco, txhawb rau customizing layouts, multithreading enhancements thiab muaj peev xwm sau-g.webp

Pom zoo: