1.声明接口
public interface getSomething { public String getBread(); }
2.继承与实现接口
public class market implements getSomething//继承接口 { public String getBread()//实现接口 { } }
posted on 2015-11-13 12:07 大木哥 阅读(148) 评论(0) 收藏 举报
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3