Cov txheej txheem:

Dab tsi yog qhov tseem ceeb ntawm Java 8 tso tawm?
Dab tsi yog qhov tseem ceeb ntawm Java 8 tso tawm?

Video: Dab tsi yog qhov tseem ceeb ntawm Java 8 tso tawm?

Video: Dab tsi yog qhov tseem ceeb ntawm Java 8 tso tawm?
Video: Koj Hais Dab Tsi?/Suabci Kwm & Ab Meej Ham/Official MV 2023 2024, Hlis ntuj nqeg
Anonim

Qee qhov tseem ceeb Java 8 nta yog;

  • forEach() txoj kev hauv Iterable interface.
  • default thiab zoo li qub txoj kev hauv Interfaces.
  • Functional Interfaces thiab Lambda Expressions .
  • Java Stream API rau Kev Ua Haujlwm Cov Ntaub Ntawv Loj ntawm Kev Sau.
  • Java Time API.
  • Kev txhim kho Collection API.
  • Concurrency API txhim kho.
  • Java IO kev txhim kho.

Khaws qhov no hauv kev xav, dab tsi ntxiv hauv Java 8?

Java 8 Nta. Oracle tso tawm ib tug tshiab version ntawm Java raws li Java 8 nyob rau lub Peb Hlis 18, 2014. Nws yog ib tug revolutionary tso tawm ntawm lub Java rau software txhim kho platform. Nws suav nrog ntau yam kev hloov kho tshiab rau lub Java programming, JVM, Cov cuab yeej thiab cov tsev qiv ntawv.

Ib yam li ntawd, cov yam ntxwv tshiab hauv Java 7 thiab 8 yog dab tsi? Java Programming Language Enhancements @ Java7

  • Binary Literals.
  • Strings nyob rau hauv cov lus hloov.
  • Sim nrog Resources lossis ARM (Automatic Resource Management)
  • Kev Ua Haujlwm Ntau Yam.
  • Kev Txhaum Cai.
  • underscore nyob rau hauv literals.
  • Hom Inference rau Generic Instance Creation siv Pob Zeb Diamond Syntax.

Kuj paub, qhov zoo ntawm Java 8 yog dab tsi?

Lambda kab lus, Stream API, thiab cov txheej txheem tshiab ntawm uas twb muaj lawm chav kawm yog qee qhov tseem ceeb ntawm kev txhim kho kev tsim khoom. Java 8's tshiab Xaiv hom muab cov neeg tsim khoom hloov pauv tau yooj yim thaum cuam tshuam nrog qhov tsis muaj nuj nqis, txo qhov yuav tshwm sim ntawm NullPointerExceptions.

Puas yog Java 1.8 zoo ib yam li 8?

Hauv JDK 8 thiab JRE 8 , cov hlua version yog 1.8 thiab 1.8 . 0. Nov yog qee qhov piv txwv uas siv txoj hlua version: java ua -version (ntawm lwm cov ntaub ntawv, rov qab java ua version 1.8.

Pom zoo: