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

    <tfoot id='FhfnM'></tfoot>
  1. <small id='FhfnM'></small><noframes id='FhfnM'>

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

      在 Java 中,如何将 String 转换为 char 或将 char 转换

      时间:2023-07-28

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

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

                本文介绍了在 Java 中,如何将 String 转换为 char 或将 char 转换为 String?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                有没有办法把一个 char 变成一个 String 或一个带有一个字母的 String 变成一个 char (例如如何将 int 转换为 double 并将 double 转换为 int)?(如果可以,请链接到相关文档).

                Is there a way to turn a char into a String or a String with one letter into a char (like how you can turn an int into a double and a double into an int)? (please link to the relevant documentation if you can).

                我如何才能找到我在文档中只是模糊地知道的类似内容?

                How do I go about finding something like this that I'm only vaguely aware of in the documentation?

                推荐答案

                char firstLetter = someString.charAt(0);
                String oneLetter = String.valueOf(someChar);
                

                您可以通过识别可能涉及的类来查找文档.在这里,候选是 java.lang.Stringjava.lang.Character.

                You find the documentation by identifying the classes likely to be involved. Here, candidates are java.lang.String and java.lang.Character.

                您应该首先熟悉:

                • java.lang
                • 中的原始包装器
                • java.util中的Java Collection框架
                • Primitive wrappers in java.lang
                • Java Collection framework in java.util

                它还有助于通过教程更慢地介绍 API.

                It also helps to get introduced to the API more slowly through tutorials.

                • 处理字符串中的字符

                这篇关于在 Java 中,如何将 String 转换为 char 或将 char 转换为 String?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:Java将字符添加到字符串 下一篇:如何在Java中将字符从字母字符转换为十六进制数

                相关文章

                最新文章

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

                  1. <tfoot id='72yeI'></tfoot>

                    <small id='72yeI'></small><noframes id='72yeI'>

                      <bdo id='72yeI'></bdo><ul id='72yeI'></ul>