Skip to content

Commit

Permalink
Merge pull request Snailclimb#324 from CarGod/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Snailclimb authored May 22, 2019
2 parents 4b581d0 + 351c1d0 commit b796f94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/java/Java基础知识.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ JRE 是 Java运行时环境。它是运行已编译 Java 程序所需的所有
## 8. 字符型常量和字符串常量的区别?

1. 形式上: 字符常量是单引号引起的一个字符; 字符串常量是双引号引起的若干个字符
2. 含义上: 字符常量相当于一个整形值( ASCII 值),可以参加表达式运算; 字符串常量代表一个地址值(该字符串在内存中存放位置)
2. 含义上: 字符常量相当于一个整型值( ASCII 值),可以参加表达式运算; 字符串常量代表一个地址值(该字符串在内存中存放位置)
3. 占内存大小 字符常量只占2个字节; 字符串常量占若干个字节(至少一个字符结束标志) (**注意: char在Java中占两个字节**)

> java编程思想第四版:2.2.2节
Expand Down

0 comments on commit b796f94

Please sign in to comment.