Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class B { //B is not allowed to extend any other class other than object
- method(){
- ....
- }
- }
- class A with B {
- ....
- ......
- }
- void main() {
- A a = A();
- a.method(); //we got the method without inheriting B
- }
Add Comment
Please, Sign In to add comment