< p>
< p>
< p>
}
< p>
< p>
< p>
< p>
< p>
< p>
< p>
< p>
< p>
< p>
< p>
< p>
Java Naming rules:
< p>
< p>
< p>
< p>
< p>
< p>
Type conversion:
The automatic conversion type is also called implicit conversion as follows:
number = 15 test=number;
Forced conversion is also called explicit conversion as follows:
number = 15 test=()number;
Note the following before using the arithmetic operators:
i =10 System.out.println(i++ System.out.println(i-- System.out.println(++ System.out.println(--
Comparison operator:
The returned result is of the boolean type. If the value is not true, false is returned.
Operator example result
= Equal to 1 = 1 true
! = Or <> not equal to 1! = 1 or 1 <> 1 false
<Less than 1 <2 true
> Greater than 1> 1 false
<= Less than or equal to 1 <= 1 true
> = Greater than or equal to 1> = 2 false
Score = 59 System. out. println (score> = 60? "Pass": "fail"