久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

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

<tfoot id='nSu2Z'></tfoot>

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

    1. <legend id='nSu2Z'><style id='nSu2Z'><dir id='nSu2Z'><q id='nSu2Z'></q></dir></style></legend>

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

        Java替換字符串特定位置的字符?

        Java Replace Character At Specific Position Of String?(Java替換字符串特定位置的字符?)

        <small id='8h48X'></small><noframes id='8h48X'>

            <tbody id='8h48X'></tbody>
            • <bdo id='8h48X'></bdo><ul id='8h48X'></ul>
              <i id='8h48X'><tr id='8h48X'><dt id='8h48X'><q id='8h48X'><span id='8h48X'><b id='8h48X'><form id='8h48X'><ins id='8h48X'></ins><ul id='8h48X'></ul><sub id='8h48X'></sub></form><legend id='8h48X'></legend><bdo id='8h48X'><pre id='8h48X'><center id='8h48X'></center></pre></bdo></b><th id='8h48X'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='8h48X'><tfoot id='8h48X'></tfoot><dl id='8h48X'><fieldset id='8h48X'></fieldset></dl></div>

              <tfoot id='8h48X'></tfoot>

              <legend id='8h48X'><style id='8h48X'><dir id='8h48X'><q id='8h48X'></q></dir></style></legend>
                  本文介紹了Java替換字符串特定位置的字符?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在嘗試替換字符串特定位置的字符.

                  I am trying to replace a character at a specific position of a string.

                  例如:

                  String str = "hi";
                  

                  將字符串位置 #2 (i) 替換為另一個字母k"

                  replace string position #2 (i) to another letter "k"

                  我該怎么做?謝謝!

                  推薦答案

                  Petar Ivanov 對 替換字符串問題中特定索引處的字符

                  字符串在 Java 中是不可變的.您無法更改它們.

                  String are immutable in Java. You can't change them.

                  您需要創建一個替換字符的新字符串.

                  You need to create a new string with the character replaced.

                  String myName = "domanokz";
                  String newName = myName.substring(0,4)+'x'+myName.substring(5);
                  

                  或者您可以使用 StringBuilder:

                  Or you can use a StringBuilder:

                  StringBuilder myName = new StringBuilder("domanokz");
                  myName.setCharAt(4, 'x');
                  
                  System.out.println(myName);
                  

                  這篇關于Java替換字符串特定位置的字符?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  quot;Char cannot be dereferencedquot; error(“Char 不能被取消引用錯誤)
                  Java Switch Statement - Is quot;orquot;/quot;andquot; possible?(Java Switch 語句 - 是“或/“和可能的?)
                  What is the type of a ternary expression with int and char operands?(具有 int 和 char 操作數的三元表達式的類型是什么?)
                  Read a text file and store every single character occurrence(讀取文本文件并存儲出現的每個字符)
                  Why do I need to explicitly cast char primitives on byte and short?(為什么我需要在 byte 和 short 上顯式轉換 char 原語?)
                  What#39;s the best way to check if a character is a vowel in Java?(在 Java 中檢查字符是否為元音的最佳方法是什么?)
                    <bdo id='yJIig'></bdo><ul id='yJIig'></ul>

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

                          <tbody id='yJIig'></tbody>
                          <i id='yJIig'><tr id='yJIig'><dt id='yJIig'><q id='yJIig'><span id='yJIig'><b id='yJIig'><form id='yJIig'><ins id='yJIig'></ins><ul id='yJIig'></ul><sub id='yJIig'></sub></form><legend id='yJIig'></legend><bdo id='yJIig'><pre id='yJIig'><center id='yJIig'></center></pre></bdo></b><th id='yJIig'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='yJIig'><tfoot id='yJIig'></tfoot><dl id='yJIig'><fieldset id='yJIig'></fieldset></dl></div>
                        1. <tfoot id='yJIig'></tfoot>
                          <legend id='yJIig'><style id='yJIig'><dir id='yJIig'><q id='yJIig'></q></dir></style></legend>
                            主站蜘蛛池模板: 国产精品视频免费 | 91免费视频观看 | 亚洲天堂av在线 | 在线亚洲电影 | 国产精品自产拍在线观看蜜 | 日韩中文一区 | 亚洲精品一区二三区不卡 | 久久精品色欧美aⅴ一区二区 | 天堂中文字幕av | 国产极品粉嫩美女呻吟在线看人 | 国产一级片免费视频 | 久久这里只有精品首页 | 久久久片| 超碰成人免费观看 | 欧美黄在线观看 | 国产精品成人一区二区三区 | 亚洲欧美日韩精品久久亚洲区 | 免费国产一区二区 | 一本一道久久a久久精品综合蜜臀 | 久久综合av| 久久久久久久久久毛片 | 91视频一88av| 久色网 | 在线免费激情视频 | 欧美色综合 | 国产一区二区精品在线观看 | 日韩中出| 在线色网| 国产精品成人一区二区 | 精品国产一区二区三区久久久蜜月 | 日本不卡一区二区 | 国产精品成人一区二区三区夜夜夜 | 2022精品国偷自产免费观看 | 国产高清在线观看 | 午夜电影网站 | 蜜臀av日日欢夜夜爽一区 | www国产成人免费观看视频,深夜成人网 | 欧美一区二区久久 | 欧美一区二区免费视频 | www.日韩 | 亚洲天堂久久新 |