Cheat single inheritance in Java?

I heard that there is a way to cheat single inheritance and implement multiple inheritance in Java Does anyone know how to implement this?

Just out of curiosity; -)

Solution

Sure, but it's tricky and you should consider if this is the way you want to go

In any case, this is tricky for complex classes, and you can use static imports (starting with Java 5) to get most of the functionality Despite the big problems of job interviews and bar tests,

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>