第2提是说:描述体现封装性的选项:D:成员函数设为private,当然是对的啦
E:是说通过别的方法来实现访问(我们通常不是通过getXXX和setXXX()来实现给外部的吗)4.选B对了,因为Foo类没有实现Runnable中的run()方法
改为以下的就可以啦import java.lang.Thread;
public class Foo implements Runnable
 {
    public void run() 
    {
             System.out.println("Running");
    }
    
    public static void main(String[] args) 
    {
     Foo ff=new Foo();
     Thread t =new Thread(ff);
     t.start();
             
    }
     
 }呵呵瞎说的不知道对了没有呢!!

解决方案 »

  1.   

    4.(1)public class Foo implements Runnable {
      (2)    public void run(Thread t) {
                 System.out.println("Running");
             }
             public static void main(String[] args) {
                 new Foo().start();
             }
         }
       A.An error at line 1 causes complication to fail
       B.An error at line 2 causes complication to fail
       答案:B
       疑问:我认为答案错了,应该选A
    楼主错 了,她是先从main开始执行的 
      

  2.   

    晕死,编译错误和执行有吗关系,是因为没有实现run方法吧,当然是第一行错了
      

  3.   

    继承关系是 is a 关系没错,但是实现关系好像也是is a吧??
      

  4.   

    上面好像都没有继承,Container 也算is a  Component吧