char变量的使用
1.阅读Character源码
Character对象会缓存127以内的字符
public static Character valueOf(char c) {
if (c <= 127) { // must cache
return CharacterCache.cache[(int)c];
}
return new Character(c);
}
定义了很多特殊字符
2022-08-24 09:49:40
1.阅读Character源码
Character对象会缓存127以内的字符
public static Character valueOf(char c) {
if (c <= 127) { // must cache
return CharacterCache.cache[(int)c];
}
return new Character(c);
}
定义了很多特殊字符