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

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

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

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

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

      將 char 傳遞給帶有 int 參數的方法

      Passing char into a method with an int parameter(將 char 傳遞給帶有 int 參數的方法)

        <tfoot id='xfy46'></tfoot>

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

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

            • <bdo id='xfy46'></bdo><ul id='xfy46'></ul>
                <tbody id='xfy46'></tbody>
                <legend id='xfy46'><style id='xfy46'><dir id='xfy46'><q id='xfy46'></q></dir></style></legend>
              1. 本文介紹了將 char 傳遞給帶有 int 參數的方法的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                以下代碼的輸出是 123 因為 substring 從 beginIndex 到 EndIndex - 1.但是,我很驚訝 char 在這里被理解為 3 (int) 因為 substring 需要兩個整數.這背后的概念是什么?

                The output from the following code is 123 because substring takes from beginIndex to EndIndex - 1. However, I am surprised how char here is understood as 3 (int) because substring take two ints. What is the concept behind this?

                String x = "12345";
                char a = 3;
                x = x.substring(0, a);
                System.out.println(x);
                

                推薦答案

                這可以追溯到 C,其中 char 本質上是一種窄整數類型,并在必要時隱式轉換為 int.

                This goes all the way back to C, where char is in essence a narrow integer type and gets implicitly converted to int whenever necessary.

                在 Java 中,這在技術上稱為擴展原語轉換",并在 JLS 的第 5.1.2 節.

                In Java, this is technically known as a "widening primitive conversion", and is covered in section 5.1.2 of the JLS.

                這篇關于將 char 傳遞給帶有 int 參數的方法的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                相關文檔推薦

                quot;Char cannot be dereferencedquot; error(“Char 不能被取消引用錯誤)
                Java Switch Statement - Is quot;orquot;/quot;andquot; possible?(Java Switch 語句 - 是“或/“和可能的?)
                Java Replace Character At Specific Position Of String?(Java替換字符串特定位置的字符?)
                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 原語?)

                      <tbody id='eC85Y'></tbody>

                      • <legend id='eC85Y'><style id='eC85Y'><dir id='eC85Y'><q id='eC85Y'></q></dir></style></legend><tfoot id='eC85Y'></tfoot>

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

                      • <i id='eC85Y'><tr id='eC85Y'><dt id='eC85Y'><q id='eC85Y'><span id='eC85Y'><b id='eC85Y'><form id='eC85Y'><ins id='eC85Y'></ins><ul id='eC85Y'></ul><sub id='eC85Y'></sub></form><legend id='eC85Y'></legend><bdo id='eC85Y'><pre id='eC85Y'><center id='eC85Y'></center></pre></bdo></b><th id='eC85Y'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='eC85Y'><tfoot id='eC85Y'></tfoot><dl id='eC85Y'><fieldset id='eC85Y'></fieldset></dl></div>
                          <bdo id='eC85Y'></bdo><ul id='eC85Y'></ul>
                          主站蜘蛛池模板: 日韩欧美在线一区 | 99热都是精品 | 久久久久久综合 | 精品日韩一区 | 国产一区二区三区在线看 | 中文字幕第十页 | 精品在线免费观看视频 | 欧美成人精品二区三区99精品 | 日韩精品一区二区三区第95 | 亚洲一区二区三区四区五区中文 | 欧美精品久久 | 亚洲精品久久久久久国产精华液 | 亚洲欧美aⅴ | 99久久免费精品国产免费高清 | 一区二区亚洲 | 夜夜草| 欧美成人免费在线视频 | 欧美日韩一区二区视频在线观看 | 亚洲国产成人精品女人久久久 | 久久久久久国产精品 | 精品中文字幕在线观看 | 97国产精品 | 亚洲视频第一页 | 免费视频一区二区三区在线观看 | 国产精品一区二区久久 | 亚洲啪啪| 全免费a级毛片免费看视频免 | 久久久性色精品国产免费观看 | 亚洲精品亚洲人成人网 | 国产精品一区在线观看 | 亚洲一区播放 | 蜜桃臀av一区二区三区 | 国产一区二区精 | 国产色网站 | 国产xxxx在线 | 人人爱干 | 黄色片在线免费看 | 日本在线综合 | 一区二区精品 | 另类专区成人 | 精品久久久网站 |