简体   繁体   中英

Is multiple inheritance in Perl and Java the same?

Java和Perl中的多重继承是否相同?

Java中没有多重继承,但是单一继承+多个接口实现,而Perl确实具有多重继承。

Don't know about Perl, but Java only allows multiple inheritance of interface. Only single-inheritance is allowed for implementation.

否。Perl没有接口,Java只允许通过接口进行多重继承。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM