Fork me on GitHub

一个类实现多个接口的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;
 }
}

 

posted @ 2015-10-08 16:57  ZZZZW  阅读(464)  评论(0编辑  收藏  举报
AmazingCounters.com