Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
We can test many conditions using the if else if al statement.
You saw the normal LaFalce lets you test one condition if the condition is true, Javor runs the if
statement and if the condition is false, Java skips the statement and runs the code inside ELT's.
In this lesson, you're going to learn to use, if else, if else, to test many conditions.
Between anything else, you can have many Elsas statements and Java only runs the first statement that
ends up being true.
The rest are ignored.
So back in her coat, I'm going to change the grade back to 65 five and I'm going to change the first
condition to say if grade is bigger than or equal to 80, then I'm going to print.
You got in a.
And now I'm going to write a series of statements based on the image we just saw, so we'll say else
if greed is bigger than or equal to 70.
Well, print, you've got to be.
And if it's greater than or equal to 60.
We'll say you got to see.
And if it's greater than or equal to 50.
Will print, you got a D.
Otherwise, you got enough.
That's runner code.
And the students scored at 65, which warrants a C.
The first condition is false.
The second condition is false, and the third condition is true because the student's grade is higher
than 60.
The other runs that code and it ignores the rest.
So instead of sixty five, we're going to set the students grade to 40.
All right, rerunning that code.
You've got enough.
That is because all the conditions are false.
So Jova runs the statement.
I encourage you to play with the great value in test each condition.
In this lesson, you changed a series of, if elusive final statements, Java tests each statement until
one of them is true and then it runs the code inside.
And if all the conditions are false, Java runs the statements.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.