vram78
Lieutenant
- Registriert
- Dez. 2015
- Beiträge
- 720
Kann mir jemand bitte etwas übersetzen? Also auch, was genau damit gemeint ist, verstehe ich nicht ganz. Google Übersetzer ist leider nicht komfortabel dafür.
if/else statements can become lengthy even when you simply want to return a value depending on a Boolean expression. Fortunately, Java provides a shortcut that allows you to write if/else statements in a single line of code. It is called the ternary conditional statement.
The term ternary comes from a Latin word that means "composed of three parts".
These three parts are:
1. A Boolean expression
2. A single statement that gets executed if the Boolean expression is true
3. A single statement that gets executed if the Boolean expression is false
mfg
if/else statements can become lengthy even when you simply want to return a value depending on a Boolean expression. Fortunately, Java provides a shortcut that allows you to write if/else statements in a single line of code. It is called the ternary conditional statement.
The term ternary comes from a Latin word that means "composed of three parts".
These three parts are:
1. A Boolean expression
2. A single statement that gets executed if the Boolean expression is true
3. A single statement that gets executed if the Boolean expression is false
mfg