2.1 语句和表达式............................................ 17 2.2 变量和数据类型........................................ 18 2.2.1 创建变量............................................ 18 2.2.2 给变量命名........................................ 19 2.2.3 变量类型............................................ 19 2.2.4 给变量赋值........................................ 20 2.2.5 常量.................................................... 21 2.3 注释............................................................ 22 2.4 字面量........................................................ 23 2.4.1 数字字面量 ........................................23 2.4.2 布尔字面量 ........................................24 2.4.3 字符字面量 ........................................24 2.4.4 字符串字面量 ....................................25 2.5 表达式和运算符 ........................................26 2.5.1 算术运算符 ........................................26 2.5.2 再谈赋值 ............................................27 2.5.3 递增和递减运算符 ............................28 2.5.4 比较运算符 ........................................29 2.5.5 逻辑运算符 ........................................29 2.5.6 运算符优先级 ....................................30 2.6 字符串运算 ................................................31 2.7 总结............................................................33 2.8 问与答........................................................33 2.9 小测验........................................................33 2.9.1 问题 ....................................................34 2.9.2 答案 ....................................................34 2.10 认证练习 ..................................................34 2.11 练习 ..........................................................34
标签:Java,字面,编程,基础,运算符,........................................,2.2,2.5,2.4 From: https://www.cnblogs.com/cnetsa/p/17112406.html