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

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

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

        <bdo id='k9JAo'></bdo><ul id='k9JAo'></ul>
      <legend id='k9JAo'><style id='k9JAo'><dir id='k9JAo'><q id='k9JAo'></q></dir></style></legend>
      <tfoot id='k9JAo'></tfoot>

        為什么不能分配 I &lt;?擴展類型>到&lt;類

        Why can#39;t assign I lt;? extends Typegt; to lt;Typegt;?(為什么不能分配 I lt;?擴展類型到lt;類型gt;?)

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

          <tbody id='pqwF4'></tbody>
        <tfoot id='pqwF4'></tfoot>
          • <bdo id='pqwF4'></bdo><ul id='pqwF4'></ul>

                <legend id='pqwF4'><style id='pqwF4'><dir id='pqwF4'><q id='pqwF4'></q></dir></style></legend>

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

                  本文介紹了為什么不能分配 I &lt;?擴展類型>到&lt;類型&gt;?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  以下陳述:

                  URLClassLoader ucl = (URLClassLoader) ClassLoader.getSystemClassLoader();
                  Class<URLClassLoader> uclc = ucl.getClass();
                  

                  因錯誤而失敗:

                  Type mismatch: cannot convert from Class<capture#2-of ? extends URLClassLoader> to Class<URLClassLoader>
                  

                  這里為什么需要演員表?

                  Why do I need a cast, here?

                  我發現了幾篇文章解釋了為什么你不能做相反的事情(將 T 分配給 a ),但這(有點)顯而易見并且可以理解.

                  I found several posts explaining why You can't do the reverse (assign T to a ), but that's (kind of) obvious and understood.

                  注意:我是在 eclipse Luna 下編寫的,所以我不知道這是 Luna 的怪癖還是我真的不理解泛型.

                  NOTE: I am coding this under eclipse Luna, so I don't know if it's a Luna Quirk or if there's something I really dont understand in generics.

                  推薦答案

                  協變 vs 逆變 vs 不變

                  • 不變的.

                  因此,

                  不是 Class<URLClassLoader>

                  在 Java 中,變量可以保存對相同類型或子類型的實例的引用.

                  In Java a variable can hold a reference of an instance of same type or subtype.

                  因此,

                  Class<URLClassLoader> uclc = ucl.getClass();
                  

                  無效.

                  另一方面,

                  Class<? extends URLClassLoader> uclc = ucl.getClass();
                  

                  將是有效.

                  這篇關于為什么不能分配 I &lt;?擴展類型>到&lt;類型&gt;?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 原語?)
                  <i id='Sqw3I'><tr id='Sqw3I'><dt id='Sqw3I'><q id='Sqw3I'><span id='Sqw3I'><b id='Sqw3I'><form id='Sqw3I'><ins id='Sqw3I'></ins><ul id='Sqw3I'></ul><sub id='Sqw3I'></sub></form><legend id='Sqw3I'></legend><bdo id='Sqw3I'><pre id='Sqw3I'><center id='Sqw3I'></center></pre></bdo></b><th id='Sqw3I'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Sqw3I'><tfoot id='Sqw3I'></tfoot><dl id='Sqw3I'><fieldset id='Sqw3I'></fieldset></dl></div>
                  • <small id='Sqw3I'></small><noframes id='Sqw3I'>

                        <tbody id='Sqw3I'></tbody>
                      <tfoot id='Sqw3I'></tfoot>
                      <legend id='Sqw3I'><style id='Sqw3I'><dir id='Sqw3I'><q id='Sqw3I'></q></dir></style></legend>
                        <bdo id='Sqw3I'></bdo><ul id='Sqw3I'></ul>

                            主站蜘蛛池模板: 青青草在线播放 | 日本视频在线免费观看 | 天堂视频在线免费观看 | 国产一区二区三区在线观看视频 | av网址在线播放 | 国产永久免费视频 | 自拍偷拍欧美日韩 | 在线观看小视频 | 老司机午夜免费精品视频 | 美女久久久久久 | 国产一区二区日韩 | av免费不卡 | 乳大翘臀1v1h糙汉 | 美女福利视频 | www国产在线观看 | 国产三级黄色片 | a视频在线| 奇米av| 精品在线免费视频 | 色站综合 | 久久精品国产亚洲 | 国产日韩欧美综合 | 国产ts在线| 国产成人精品免费视频 | 中文字字幕 | 天天看天天干 | 色妞色视频一区二区三区四区 | 黄色一级免费看 | 国产aaaaaa| 丁香av| 最新超碰 | 久久久久久久久久久久久久久久久久久 | 欧美成人三级在线观看 | 日韩久久av | 欧美日韩中文字幕 | 免费视频毛片 | 999久久久国产精品 亚洲黄色三级 | www.av在线| 亚洲三级黄色片 | www.日本黄色 | 国产欧美日韩综合 |