Java 接口

1.声明接口

public interface getSomething

{

  public String getBread();

}

 

2.继承与实现接口

public class market implements getSomething//继承接口
{
     public String getBread()//实现接口
    {
    }
}

 

posted on 2015-11-13 12:07  大木哥  阅读(144)  评论(0编辑  收藏  举报

导航