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

    <bdo id='Bh3vw'></bdo><ul id='Bh3vw'></ul>
<tfoot id='Bh3vw'></tfoot>

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

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

      1. 这是 Java 包导入应该如何工作的吗?

        时间:2023-09-27

            <tbody id='EExJH'></tbody>

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

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

                <legend id='EExJH'><style id='EExJH'><dir id='EExJH'><q id='EExJH'></q></dir></style></legend>
                <i id='EExJH'><tr id='EExJH'><dt id='EExJH'><q id='EExJH'><span id='EExJH'><b id='EExJH'><form id='EExJH'><ins id='EExJH'></ins><ul id='EExJH'></ul><sub id='EExJH'></sub></form><legend id='EExJH'></legend><bdo id='EExJH'><pre id='EExJH'><center id='EExJH'></center></pre></bdo></b><th id='EExJH'></th></span></q></dt></tr></i><div id='EExJH'><tfoot id='EExJH'></tfoot><dl id='EExJH'><fieldset id='EExJH'></fieldset></dl></div>

                <tfoot id='EExJH'></tfoot>
                • 本文介绍了这是 Java 包导入应该如何工作的吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我一直在为我的第一个正则表达式而苦苦挣扎.在编译过程中,PatternMatcher不断出现cannot find symbol错误.

                  我刚刚将 import java.util.* 更改为 import java.util.regex.*,它就像在做梦一样.

                  我的印象是 importing java.util.*引入 java.util.*.* 等.不是这样吗?我找不到任何解决这个特定问题的文档......

                  解决方案

                  是的,这就是包导入在 Java 中的工作方式(并且应该工作).例如,执行 import javax.swing.*; 将导入 javax.swing.* 中的所有 classes不是 子包及其类.

                  所以,javax.swing.*not 导入 javax.swing.eventjavax.swing.event.*

                  阅读以下博客以获得一些友好的新手建议.p>

                  I've been struggling with my first regex. During the compile, Pattern and Matcher kept getting cannot find symbol errors.

                  I just changed import java.util.* to import java.util.regex.* and it works like a dream.

                  I was under the impression that importing java.util.* would also bring in java.util.*.* etc. Is that not the case? I can't find any documentation that addresses this specific question....

                  解决方案

                  Yes, that is how package imports work (and are supposed to work) in Java. For example, doing import javax.swing.*; will import all classes within javax.swing.* but not sub-packages and their classes.

                  Ergo, javax.swing.* will not import javax.swing.event or javax.swing.event.*

                  Read the following blog for some friendly newbie advice.

                  这篇关于这是 Java 包导入应该如何工作的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:为什么我们不应该使用(默认)src 包? 下一篇:程序运行时如何播放背景音乐?在java中

                  相关文章

                  最新文章

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

                  1. <tfoot id='I4AI3'></tfoot>

                      • <bdo id='I4AI3'></bdo><ul id='I4AI3'></ul>

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

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