- Distributed Computing in Java 9
- Raja Malleswara Rao Pattamsetti
- 95字
- 2021-07-02 21:02:37
Inheritance
Interfaces can extend one or more interfaces if they want to carry out other interface operations, and in addition to that, declare their own operations as follows:
module EmployeeHierarchy {
interface Person {
typedef unsigned short ushort;
ushort method1();
};
interface Employee : Person {
Boolean method2(ushort num);
};
};
In the preceding code, the Employee interface extends the Person interface and adds method2() in addition to method1() inherited from the Person interface.
The following is an example of one interface inheriting multiple interfaces:
interface Clerk: Person, Employee, Associate::Administrator {
};
推薦閱讀
- The Complete Rust Programming Reference Guide
- Implementing Modern DevOps
- Learn to Create WordPress Themes by Building 5 Projects
- C語言程序設(shè)計(jì)基礎(chǔ)與實(shí)驗(yàn)指導(dǎo)
- Mastering Python Scripting for System Administrators
- Practical DevOps
- 你必須知道的204個(gè)Visual C++開發(fā)問題
- Mastering RStudio:Develop,Communicate,and Collaborate with R
- PHP 7+MySQL 8動(dòng)態(tài)網(wǎng)站開發(fā)從入門到精通(視頻教學(xué)版)
- 微信小程序全棧開發(fā)技術(shù)與實(shí)戰(zhàn)(微課版)
- Creating Data Stories with Tableau Public
- jQuery for Designers Beginner's Guide Second Edition
- 多媒體技術(shù)及應(yīng)用
- 從零開始:C語言快速入門教程
- Mastering Bootstrap 4