if two files are in the same directory, it is assumed that the classes in these files are in the same package unless indicated otherwise. "javac" command searches for unknown classes in the same package automatically

解决方案 »

  1.   

    对于没有显示指出 package 的类,同属于一个默认地 package。编译器可以在同一个目录中自动地寻找所需要的类。
      

  2.   

    同一个目录下不用import.默认在本目录下找.
    如果不在一个目录的话需要import,并且需要设置classpath.
      

  3.   

    根据去年看过的scjp考试指南的记忆
    类有四种:public,private,protect和default(不用写)
    开放性:public>protect>default>private
    同一个package里面default开始的类都可以被共package的其他类访问
    记错了请指正!
      

  4.   

    http://www.csdn.net/Expert/TopicView.asp?id=85391&datebasetype=200101