- public class MyAbstractExe2 extends MyAbstractExe1, MyAbstractExe3
- {
- @Override
- void run() {
- System.out.println("run");
- }
- }
- abstract class MyAbstractExe3 {
- abstract void run();
- void test() {
- System.out.println("test of MyAbstractExe3 !!");
- }
- }
- abstract class MyAbstractExe1 {
- abstract void run();
- void test() {
- System.out.println("test of MyAbstractExe1 !!");
- }
- }
No ! we can not inherit a class from multiple abstract class. Syntax error by compiler at line 1
No comments:
Post a Comment