This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 三目运算符 # | |
| 条件运算符 | |
| 结构:boolean表达式?表达式1:表达式2; | |
| 运算规则 | |
| 先计算boolean表达式; | |
| 如果boolean表达式的值为true,整个表达式的值为表达式1的值; | |
| 如果boolean表达式的值为false,整个表达式的值为表达式2的值 | |
| int a = 100, b = 200; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 、减(-)、乘(*)、除(/) | |
| 取模运算符 | |
| % | |
| –自增(减)运算符 | |
| ++、-- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 基本类型间转换 # | |
| 不同的基本类型直接可以相互转换 | |
| 自动类型转换(隐式类型转换) | |
| 从小类型到大类型可以自动完成 | |
| 就是直接写出的整数 | |
| int a = 100; | |
| # 关于整数直接量的注意事项 # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 分类 # | |
| 基本数据类型(Primary Data Type) | |
| 引用数据类型(Reference Data Type) | |
| # Java基本数据类型 # | |
| 8种 | |
| 4类 | |
| 整数类型 | |
| 浮点数类型 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 进制转换 # | |
| 进制转换 | |
| 人们利用符号来计数的方法 | |
| 由一组数码符号和两个基本因素“基数”与“位权”构成 | |
| 基数 | |
| 进位计数制的每位数上可能有的数码的个数 | |
| 如:十进制的每位上的数码有0、1……9十个数码,所以基数为10,而二进制、八进制和十六进制的基数分别是2、8和16 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 常量 # | |
| 概念 | |
| 在程序运行过程中值不能发生改变的数据称为 | |
| 常量。 | |
| 声明 | |
| 用关键字final来定义 | |
| final Type varName = value [, varName [ =value] …]; | |
| final int globalAccount = 100, nationalAccount = 50; | |
| final double PI=3.14159; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 注释 # | |
| 单行注释 | |
| //some codes here | |
| 多行注释 | |
| /*some codes here*/ | |
| 文档注释 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ![21.png](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAzYAAAHlCAYAAAAnemnpAAAgAElEQVR4nOydBVwVWRuHH7iUoKACiiBgYHeuza66dufavXa32N3dvTZ2rp3Y3aIiggoqopTk5cI3MyrSpfu5uOfhd3/ce2fmxNyZOe//nPe8R+uq59tIv7AwBIIfgamBPkXNzTj90uNHF0UgEAgEAoFAkEbJpK+P9o8uhEAgEAgEAoFAIBB8K0LYCAQCgUAgEAgEgjSPEDYCgUAgEAgEAoEgzSOEjUAgEAgEAoFAIEjzCGEjEAgEAoFAIBAI0jxC2AgEAoFAIBAIBII0jxA2AoFAIBAIBAKBIM0jhI1AIBAIBAKBQCBI8whhIxAIBAKBQCAQCNI8QtgIBAKBQCAQCASCNI8QNgKBQCAQCAQCgSDNI4TNv5CQ4OAfXQSBQCAQ/INERkYSFhLyo4shEAgEPxU/nbBxuX+fbUuXJNhgPLl3lzFdOuHl6Zms9LzfvGbIHy24fu5skvuGhgTTq14djuxwRB0WlqJyf+HamdPUL5CXuSOG4fPuXarSEAgEAsG/G8flS6mbPw8Xjx39bmmumDKJFZMnEhER8d3SFAgEgrTETydsPNzdWDNzOo2KFuLulctxth/Z7sjlkydoU+EXDm/bmmR6ty5c4M7lS4xs35azhw4mum+4Opyn9+8xZ+gQFo8dnaryF69QkcxZsihl6/J7VbzfvklVOgKBQCD4d/Ly2TM2LVygvB/3Z1dePX/+XdJ98/IlO1evom/Devj7+MTY9vyxM14eHt8lH4FAIPi38tMJG/u69WjUsRNqtZpRHdpx+sD+qG1yL9bpffuiPifH5euGk5Pyv2DJUlSsUTPGNtdHjzi4eWPUZ4N06dDS0kJbW5sOg4bwwsWFq2dOJ5i2nL/sjhAdXT095jjuRE9fn0D/AHauWhnvsYEBAaJXTiAQCNIYgf7+DGvzB6HR2h916PdxSRs2Zx7GmTLx9P59etS |
NewerOlder