This chapter has learned several goals to master Java several annotations know the difference between JDK,JRE master Java several data types, know about the range of Java keywords and escape characters Java Value Conversion 1.java several comments There are three types of annotations in Java
- Line Comment
- Block annotations
- Document comments
Example: Packagecom. Notes;/*** There are three types of annotations in Java* Line Comment* Block Comment* Documentation Comments* Note examples * *@author like* Here is the document comment */ PublicclassNotesexample{ /** Block Comment */ PublicStaticvoid Main(String[]args){ //Here is the line comment }}
2. Know the difference of JDK,JRE see: The difference between "Java Essentials" JDK and JRE 3. Master Java data types, know the approximate range
| Serial number |
Data type |
Default value |
Size/bit |
Range |
| 1 |
BYTE (bit) |
0 |
8 |
-128-127 |
| 2 |
Short |
0 |
16 |
-32768-32767 |
| 3 |
Int |
0 |
32 |
2.1 billion |
| 4 |
Float |
0.0f |
32 |
.. |
| 5 |
Double |
0.0d |
64 |
.. |
| 6 |
Long |
0L |
64 |
.. |
| 7 |
Char |
\u0000 (empty) |
2 |
0-255 |
4.java keyword 4.1java escape character 5. Automatic conversion of numeric conversions
Description: No precision lost, dashed line may be lost! 5.1 cast int can go double, that double to int?
- This requires a double D = 2 to be cast;
- int i = (int) d;
2015, I hope I can break through their own, refueling! .
Basic Java Research