泰安网页设计公司,seo优化技巧,网站空间商,广元市住房和城乡建设局网站Gitchat连接
https://gitbook.cn/gitchat/activity/5f50804bbe67a5348a9b2c91
简介
从底层#xff0c;从原理#xff0c;我们来重学一次 Java。Character 是char#xff08;字符#xff09;的封装类#xff0c;是String用于字符存储的类型#xff0c;他的源码及实现是…Gitchat连接
https://gitbook.cn/gitchat/activity/5f50804bbe67a5348a9b2c91
简介
从底层从原理我们来重学一次 Java。Character 是char字符的封装类是String用于字符存储的类型他的源码及实现是怎样的呢
本系列秉承所有结论尽量从源码中来没有源码的尽量标明出处。相关源码会附着在文章中读本文即可不用再自行查找源码及资料学习方便大家充分利用路上的碎片时间。
本篇 Chat 对Character的属性、构造函数、字符数据等进行逐一源码分析帮助大家深入理解和学习 JDK 源码。
本文包含以下内容
类信息 类的定义类的继承结构 常量 进制数范围char类型值域UTF-16编码范围Unicode码位范围基本类型一般类别位数、字节数 SubsetUnicodeBlock 类定义map构造函数各块静态常量blockStartsblocksof(char c)of(int codePoint)forName(String blockName) UnicodeScript scriptStartsscriptsaliases别名of(int codePoint) Character.isValidCodePoint(int codePoint)Character.getType(int codePoint)CharacterData.of(int ch)CharacterDataLatin1Arrays.binarySearch(int[] a, int key) forName(String scriptName) value属性构造函数CharacterCachevalueOfcharValuehashCodeequalstoString toString() String.valueOf(char data[])String的String(char value[])构造函数Arrays.copyOf(char[] original, int newLength) toString(char c) String.valueOf(char c)String(char[] value, boolean share) 比较两者 几个判断函数 isValidCodePoint(int codePoint)isBmpCodePoint(int codePoint)isSupplementaryCodePoint(int codePoint)isHighSurrogate(char ch)isLowSurrogate(char ch)isSurrogate(char ch)isSurrogatePair(char high, char low) charCount(int codePoint)大小写判断 小写判断大写判断 大小写转换 转小写 toLowerCase(char ch)toLowerCase(int codePoint) 转大写 toUpperCase(char ch)toUpperCase(int codePoint)CharacterDataLatin1.toUpperCase(int ch) UTF-16处理 toSurrogates(int codePoint, char[] dst, int index)highSurrogate(int codePoint)lowSurrogate(int codePoint) forDigit(int digit, int radix)
适用人群有一些 Java 基础的人群。