一个类实现多个接口的demo

  

//A接口
interface A{
 public int getA();
}
//B接口
interface B{
 public int getB();
}
//实现了某个接口必须实现其全部的方法
public class ImpAB implements A,B{

 public int getA() {
  return 0;
 }

 public int getB() {
  return 0;
 }
}
---- 动动手指关注我!或许下次你又能在我这里找到你需要的答案!ZZZZW与你一起学习,一起进步!
原文地址:https://www.cnblogs.com/zzzzw/p/4861524.html