interface A {
public void methodA();
}interface B extends A {
public void methodA();
public void methodB();
}class BB implements B {
public void methodA(){}
public void methodB(){}
}public class TestBB {
public static void main(String[] args) {
B myBB; // 接口B
myBB = new BB();
myBB.methodA(); // 通过从接口A继承的接口B调用methodA
myBB.methodB(); // 通过从接口A继承的接口B调用methodB
}
}
public void methodA();
}interface B extends A {
public void methodA();
public void methodB();
}class BB implements B {
public void methodA(){}
public void methodB(){}
}public class TestBB {
public static void main(String[] args) {
B myBB; // 接口B
myBB = new BB();
myBB.methodA(); // 通过从接口A继承的接口B调用methodA
myBB.methodB(); // 通过从接口A继承的接口B调用methodB
}
}
clone, finalize, getClass, notify, notifyAll, wait, wait, wait 是什么意思?
这几个Methods可以使用在String上么?比如说我想用method clone, 又如何使用呢?