啥叫包含?如果是引用的话
 import chapter15.code.scope.Scope
 就可以用了

解决方案 »

  1.   

    class ScopeFrame {
    .....
    Scope d = new Scope();
    d.method();
    Sting i = d.value;}
      

  2.   

    我就是用import chapter15.code.scope.Scope来引用的,可是用javac编译时报错为
    class chapter15.code.scope.Scope not found in inport
    这是怎么回事,两个文件就在同一个文件夹里,我具体贴出来,大家看看?
    file1:Scope.javapackage chapter15.code.scope;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.Serializable;public class Scope extends Canvas implements Serializable
    {
    .............
    }file2:ScopeFrame.java
    package chapter15.code.scope;import chapter15.code.scope.Scope;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.Serializable;
    public class ScopeFrame extends Frame
    {
    Scope scope;
       ......................
             scope=new Scope();
         ..............
    }
    用的环境是WIN2000+JDK1.2.2
      

  3.   

    如果没看错的话,两文件是同一个包中吧,如果是同一个包中就不用import了.
    而且,当你用package XXX.xxx.xx的时候请确认你同时也建立好了文件目录级.
    例如: package xxx.yy   中有ss.java 那么请确定 ss.java 存在目录\xxx\yy\下边