Character
Directly from the video inside, did not understand the relationship between these character sets, and did not go to check, this time just in the video.
Integer types and binary conversions
Learn several types of integral type, the previous school learned C, the content is similar, so did not encounter any problems.
1 Public classTestdatatype {2 3 Public Static voidMain (string[] args) {4 intA = 10;5 intA2 = 010;6 intA3 = 0xf;7 System.out.println (a);8 System.out.println (A2);9 System.out.println (A3);Ten System.out.println (Integer.tobinarystring (a)); One System.out.println (Integer.tooctalstring (a)); A System.out.println (Integer.tohexstring (a)); - } -}
Operation Result:
Of course, in addition to the int type, there are byte, long and other types.
Floating point number
Represents a decimal, divided into float and double (default).
Java Learning (ii)