Java Lesson 2: operators and expressions, java operator expressions
1. modulo %. If the remainder is zero, the Division can be judged.
2. The remainder is always less than the divisor.
3. When the auto-increment operator ++ or the auto-subtraction operator is used independently, the first ++, -- last ++, and -- operations are the same.
4. First add one, then use, first use, then add one, then ++
5. Short-circuit logic. If one can be judged less, no more can be judged.
6. And & each condition must be true before the result is true.
Or | if one of the conditions is true, the result is true.
Not! Reversing the original Boolean Value
7. characters are enclosed in single quotes, and strings are enclosed in double quotes.
8. A conditional operator is also called a three-object operator and is usually used in a value assignment statement.
9. Three-object operator nesting
// Judgment conditions and conclusions
/*
* 1. Is it a person? If yes, leave it
* 2. Is it a demon? If yes, kill
* 3. Otherwise, Tai
*/
R = who = 'people '? 'Left ':
Who = 'shid '? 'Ky ':
'Ta ';
System. out. println (r );
10. All software can be summarized with three letters: IPO: Input, Process, Output