
在Java中,一个接口不能实现另一个接口。
BJXShop网上购物系统是一个高效、稳定、安全的电子商店销售平台,经过近三年市场的考验,在中国网购系统中属领先水平;完善的订单管理、销售统计系统;网站模版可DIY、亦可导入导出;会员、商品种类和价格均实现无限等级;管理员权限可细分;整合了多种在线支付接口;强有力搜索引擎支持... 程序更新:此版本是伴江行官方商业版程序,已经终止销售,现于免费给大家使用。比其以前的免费版功能增加了:1,整合了论坛
0
interface MainInterface {
void mainMethod();
}
interface SubInterface extends MainInterface { // If we put <strong>implements </strong>keyword in place of <strong>extends, </strong>// compiler throws an error.
void subMethod();
}
class MainClass implements MainInterface {
public void mainMethod() {
System.out.println("Main Interface Method");
}
public void subMethod() {
System.out.println("Sub Interface Method");
}
}
public class Test {
public static void main(String args[]) {
MainClass main = new MainClass();
main.mainMethod();
main.subMethod();
}
}Main Interface Method Sub Interface Method
以上就是为什么在Java中一个接口不能实现另一个接口?的详细内容,更多请关注php中文网其它相关文章!
java怎么学习?java怎么入门?java在哪学?java怎么学才快?不用担心,这里为大家提供了java速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号