久久久久久久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>
                            主站蜘蛛池模板: 久久精品国产一区二区电影 | 成人亚洲视频 | 99精品热视频| 国产精品日产欧美久久久久 | 精品国产99| 欧美中文字幕一区二区三区亚洲 | 国产专区在线 | 国产剧情一区 | 亚洲成人激情在线观看 | 一区 | 国产精品日韩一区二区 | 精品国产99| 欧美一区二区三区久久精品 | 亚洲综合国产精品 | 四虎在线观看 | 日韩精品成人网 | 国产精品夜夜夜一区二区三区尤 | 奇米四色影视 | 欧美在线激情 | 久久人体视频 | 日日夜夜精品视频 | 亚洲黄色片免费观看 | 亚洲一本| 欧美专区在线视频 | 国产三级网站 | 精品久久久久久久久久久久久久 | 毛片在线免费播放 | 青青久久av北条麻妃海外网 | 九九热re | 亚洲精品免费观看 | 国产黄色在线观看 | 日本高清视频在线播放 | 国产成人精品免费 | 欧美综合视频 | 国产香蕉视频在线播放 | h视频免费在线观看 | 欧美一卡二卡在线观看 | 在线视频一区二区三区 | 国产精品一区久久久久 | 日本特黄a级高清免费大片 特黄色一级毛片 | 午夜影院普通用户体验区 |