02-01 Java keywords, identifiers, comments, constants and hexadecimal problems, variables and data types

1:关键字

2: Identifier

3:注释

Examples of writing notes

4:常量

5:进制转换

Binary overview and binary, octal and hexadecimal diagrams:

Data representation of different bases:

Binary conversion

Other base to decimal

Decimal to other base:

Fast binary conversion:

有符号数据表示法,原码、反码、补码

6: Variable

Overview and format of variables

7:数据类型

Methods for defining 8 types of variables

Precautions when using variables:

8: Data type conversion

Data types are converted by default (from small to large), and small types are converted to large types first

The principle of converting small into large before operation, complement calculation

Cast type:

Difference between variable addition and constant addition:

Result calculation after forced conversion data overflow:

Character data and string participate in operation:

字符串数据和其他数据做+,也就是字符串在前面,其他数据在后面,结果是字符串类型。

Several small problems:

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>