<bdo id='JYE93'></bdo><ul id='JYE93'></ul>
  • <tfoot id='JYE93'></tfoot>

  • <legend id='JYE93'><style id='JYE93'><dir id='JYE93'><q id='JYE93'></q></dir></style></legend>

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

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

        如果我不指定,我的课程放在哪个默认包中?

        时间:2023-09-27
          <tbody id='ifqBY'></tbody>

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

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

              • <legend id='ifqBY'><style id='ifqBY'><dir id='ifqBY'><q id='ifqBY'></q></dir></style></legend>
                  <bdo id='ifqBY'></bdo><ul id='ifqBY'></ul>

                • <tfoot id='ifqBY'></tfoot>

                  本文介绍了如果我不指定,我的课程放在哪个默认包中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  假设我有一个名为 Main.java 的文件,其代码如下:

                  Let's assume I have a file named Main.java with the following code:

                  public class Main {
                      public static void main(String[] args) {
                          System.out.println("Hello world");
                      }
                  }
                  

                  它是否放在一个特定的包中,在(也许?)一个未命名的包中?

                  Is it put in a specific package, in (maybe?) an unnamed package?

                  谢谢

                  推荐答案

                  不在命名包中的类在 未命名包.因此完整的类名是Main.

                  A class that is not in a named package is in an unnamed package. Thus the full class name is Main.

                  此类类不能使用命名包,但通过反射除外.

                  Such classes cannot be used from a named package, except via reflection.

                  JLS 说:

                  Java SE 平台提供未命名的包主要是为了方便开发小型或临时应用程序或刚开始开发时.

                  Unnamed packages are provided by the Java SE platform principally for convenience when developing small or temporary applications or when just beginning development.

                  这篇关于如果我不指定,我的课程放在哪个默认包中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:(Java)包组织有最佳实践吗? 下一篇:Java:子包可见性?

                  相关文章

                  最新文章

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

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

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