标识符与命名规范

image-20230204165140864

image-20230204165146327

image-20230204165337404

float的范围比long还大,并且定义的数值后面要加F或f

定义char(字符型)变量通常使用单引号

char只能使用一个字符(等于两个字节)

image-20230204165401862

boolean变量 变量值只能取true或false,默认是false

常常在条件判断与循环中使用

tips:\n前面加.变为\n.就不再表示了,\的作用相当于转义.,\后的特殊符号不在表达含义

String

string不属于基本数据类型,他是引用数据类型

image-20230204165431567

Donate
  • Copyright: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
  • Copyrights © 2023 Langxecho
  • Visitors: | Views:

请我喝杯咖啡吧~

支付宝
微信