Skip to content

Commit b796f94

Browse files
authored
Merge pull request Snailclimb#324 from CarGod/patch-1
2 parents 4b581d0 + 351c1d0 commit b796f94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/java/Java基础知识.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ JRE 是 Java运行时环境。它是运行已编译 Java 程序所需的所有
150150
## 8. 字符型常量和字符串常量的区别?
151151

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

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

0 commit comments

Comments
 (0)