- public class MyAbstractExe2 extends MyAbstractExe1
- {
- @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 !!");
- }
- }
Yes! we can inherit a class from one abstract class. compiler will not give error.
No comments:
Post a Comment