interface A
{
    double test() ;
}
interface B
{
    void test() ;
}
public class TestInterface implements A,B{
    //现在里面怎么办?????
// public double test()
// {
// return 1.0 ;
// }
// public void test(){}
}

解决方案 »

  1.   

    接口a
    public interface a {
           public void fun();
    }
    ---------------------------------------------------------
    接口b
    public interface b {
           public void fun();}
    ----------------------------------------------------------
    类c实现 a,b两个接口,并覆写相同的抽象方法 fun()
    public class c implements a, b { public void fun() {}
      

  2.   

    这种写法,会有一个 The return type is incompatible with 的错误
    返回类型矛盾