Cov txheej txheem:

Yuav ua li cas koj sau ib qho IF THEN nqe lus hauv Java?
Yuav ua li cas koj sau ib qho IF THEN nqe lus hauv Java?

Video: Yuav ua li cas koj sau ib qho IF THEN nqe lus hauv Java?

Video: Yuav ua li cas koj sau ib qho IF THEN nqe lus hauv Java?
Video: Niam pog khaws qe 10/19/2017 2024, Kaum ib hlis
Anonim

Java muaj cov ntsiab lus hauv qab no:

  1. Siv yog hais tias yuav tsum tau hais kom ib tug block ntawm code yuav tsum tau ua, yog hais tias ib tug tej yam kev mob muaj tseeb.
  2. Siv lwm tus los qhia txog qhov thaiv ntawm cov lej kom raug tua, yog tias tib yam xwm txheej tsis tseeb.
  3. Siv lwm tus yog kom qhia meej qhov xwm txheej tshiab los sim, yog tias thawj qhov xwm txheej tsis tseeb.

Ib yam li ntawd, koj sau li cas yog cov lus hauv Java?

Java muaj cov ntsiab lus hauv qab no:

  1. Siv yog kom qhia meej txog qhov thaiv ntawm cov lej yuav tsum tau ua, yog tias qhov xwm txheej muaj tseeb.
  2. Siv lwm tus los qhia txog qhov thaiv ntawm cov lej kom raug tua, yog tias tib yam xwm txheej tsis tseeb.
  3. Siv lwm tus yog kom qhia meej qhov xwm txheej tshiab los sim, yog tias thawj qhov xwm txheej tsis tseeb.

Ib yam li ntawd, yog dab tsi yog THAWJ nqe lus hauv computer? Ib yog hais tias yog programming conditional nqe lus uas, yog ua pov thawj tseeb, ua haujlwm lossis qhia cov ntaub ntawv. Hauv qab no yog ib qho piv txwv ntawm ib qho yog hais tias , tsis tshwj xeeb rau ib yam lus programming.

Piv txwv li, yog tias / tom qab ntawd lwm nqe lus yog dab tsi?

Yog / Ces / Lwm Cov Lus Qhia . Cov yog / ces nqe lus yog conditional nqe lus uas executes nws sub- nqe lus , uas ua raws li cov ces lo lus tseem ceeb, nkaus xwb yog qhov muab mob ntsuas kom muaj tseeb: Hauv cov lus saum toj no piv txwv , cov mob yog x <10, thiab cov nqe lus execute yog x: = x + 1.

Dab tsi yog Do Thaum Loop Syntax?

Syntax . ua { nqe lus; } thaum (qhov xwm txheej); Daim ntawv ceeb toom tias cov lus qhia muaj cai tshwm nyob rau qhov kawg ntawm qhov lub voj , yog li cov nqe lus (s) nyob rau hauv lub voj executes ib zaug ua ntej kuaj mob. Yog tias qhov xwm txheej yog qhov tseeb, qhov ntws ntawm kev tswj tau dhia rov qab mus rau ua , thiab cov nqe lus (s) nyob rau hauv lub voj rov ua dua.

Pom zoo: