• <i id='Pg20m'><tr id='Pg20m'><dt id='Pg20m'><q id='Pg20m'><span id='Pg20m'><b id='Pg20m'><form id='Pg20m'><ins id='Pg20m'></ins><ul id='Pg20m'></ul><sub id='Pg20m'></sub></form><legend id='Pg20m'></legend><bdo id='Pg20m'><pre id='Pg20m'><center id='Pg20m'></center></pre></bdo></b><th id='Pg20m'></th></span></q></dt></tr></i><div id='Pg20m'><tfoot id='Pg20m'></tfoot><dl id='Pg20m'><fieldset id='Pg20m'></fieldset></dl></div>

    <legend id='Pg20m'><style id='Pg20m'><dir id='Pg20m'><q id='Pg20m'></q></dir></style></legend>
    • <bdo id='Pg20m'></bdo><ul id='Pg20m'></ul>
      <tfoot id='Pg20m'></tfoot>
      1. <small id='Pg20m'></small><noframes id='Pg20m'>

        Character.getNumericValue() 问题

        时间:2023-07-27

            <tbody id='5jrbu'></tbody>
        1. <i id='5jrbu'><tr id='5jrbu'><dt id='5jrbu'><q id='5jrbu'><span id='5jrbu'><b id='5jrbu'><form id='5jrbu'><ins id='5jrbu'></ins><ul id='5jrbu'></ul><sub id='5jrbu'></sub></form><legend id='5jrbu'></legend><bdo id='5jrbu'><pre id='5jrbu'><center id='5jrbu'></center></pre></bdo></b><th id='5jrbu'></th></span></q></dt></tr></i><div id='5jrbu'><tfoot id='5jrbu'></tfoot><dl id='5jrbu'><fieldset id='5jrbu'></fieldset></dl></div>

              <small id='5jrbu'></small><noframes id='5jrbu'>

              • <bdo id='5jrbu'></bdo><ul id='5jrbu'></ul>

                  <legend id='5jrbu'><style id='5jrbu'><dir id='5jrbu'><q id='5jrbu'></q></dir></style></legend>
                  <tfoot id='5jrbu'></tfoot>

                1. 本文介绍了Character.getNumericValue() 问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我可能遗漏了什么,但为什么这两个数值等于 -1?

                  I'm probably missing something, but why are the two numeric values equal to -1?

                  System.out.println(Character.getNumericValue(Character.MAX_VALUE));
                  System.out.println(Character.getNumericValue(Character.MIN_VALUE));
                  

                  返回:

                  -1
                  -1
                  

                  推荐答案

                  getNumericValue() 将转换实际表示数字的字符(如正常"数字 0-9,但也包括其他数字脚本)到它们的数值.Character.MAX_VALUECharacter.MIN_VALUE所代表的Characters没有这样的数值;它们不是数字.并根据 API 文档:

                  getNumericValue() will convert characters that actually represent numbers (like the "normal" digits 0-9, but also numerals in other scripts) to their numeric value. The Characters represented by Character.MAX_VALUEand Character.MIN_VALUE do not have such a numeric value; they are not numerals. And according to the API doc:

                  如果角色没有数值,则返回-1.

                  If the character does not have a numeric value, then -1 is returned.

                  这篇关于Character.getNumericValue() 问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:将一维字符串数组转换为二维字符数组 下一篇:Java char 数组是否始终是有效的 UTF-16(Big Endian)编码

                  相关文章

                  最新文章

                    <bdo id='cUqnr'></bdo><ul id='cUqnr'></ul>

                  <small id='cUqnr'></small><noframes id='cUqnr'>

                    <tfoot id='cUqnr'></tfoot>
                    <legend id='cUqnr'><style id='cUqnr'><dir id='cUqnr'><q id='cUqnr'></q></dir></style></legend>
                    <i id='cUqnr'><tr id='cUqnr'><dt id='cUqnr'><q id='cUqnr'><span id='cUqnr'><b id='cUqnr'><form id='cUqnr'><ins id='cUqnr'></ins><ul id='cUqnr'></ul><sub id='cUqnr'></sub></form><legend id='cUqnr'></legend><bdo id='cUqnr'><pre id='cUqnr'><center id='cUqnr'></center></pre></bdo></b><th id='cUqnr'></th></span></q></dt></tr></i><div id='cUqnr'><tfoot id='cUqnr'></tfoot><dl id='cUqnr'><fieldset id='cUqnr'></fieldset></dl></div>