Operator:
1) arithmetic operator: +-*/%,++,--
Add, subtract, multiply, divide, take remainder, self-increment, self-subtract
2) relational operator: >,<,>=,<=,==,!= Boolean type
Determine the value of two shaping or floating-point sizes to be Boolean
3) logical operator: &&,| |,! Boolean type
&&: Short-circuit and (and), both sides are true, see false False if the 1th number is false, a short circuit occurs (the latter is not executed)
| |: Short circuit or (or), one side is true, see true True if the 1th number is true, a short-circuit occurs (the back is not executed)
!: logical non (take reverse), non-true false, not false then true
4) Assignment operator: =,+=,-=,*=,/=,%=
Assigning a value of the corresponding type to a variable
5) String Join operator: +
6) Three mesh operator: Boolean number 1: Number 2
Boolean number 1: Number 2
To calculate the Boolean value:
If true, the result of the entire expression is 1 if false, the result of the entire expression is 2
Branching structure: Conditional execution of a statement, not every sentence must go
1) If:1 Road
2) If...else:2 Road
3) If...else if: Multiple paths
4) Switch...case: multiple routes
Advantages: High efficiency, clear structure
Cons: Integers, equals
Break: Jump out of switch
I am a beginner, if the update is not good, welcome the Great God pointed out, thank you!
More exciting after the update, reprinted annotated!
Java-operator and judgment