久久久久久久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国产精品 | 欧美性一区二区三区 | 精品视频在线播放 | 日本在线一区二区三区 | 久久91视频| 久久精品97| 亚洲日本一区二区三区四区 | 精品国产乱码久久久久久影片 | 91在线网站| 日韩国产在线 | 青青草视频免费观看 | 久久在线视频 | 天天射网站 | 欧美日韩国产一区二区三区 | 97精品超碰一区二区三区 | 日韩精品一区二区三区在线播放 | 天天躁日日躁aaaa视频 | 日韩精品久久久久 | 国产精品有限公司 | 国产精品精品久久久 | 亚洲精品日本 | 欧美一级在线免费 | 亚洲一一在线 | 国产精品久久久久久久粉嫩 | 久久久免费 | 成人av电影在线观看 | 一区二区三区网站 | 亚洲电影一区 | 九九九久久国产免费 | 亚洲精品国产一区 | 日本天堂一区 | av网站免费观看 | 亚洲一区二区久久 | 狠狠骚| 看a网站| 国产视频在线观看一区二区三区 | 成人影院免费视频 | 天天看天天爽 | 中文字幕在线精品 |