Java Programming Thoughts 3editor Reading Notes (8 Interfaces and Internal Class)

xiaoxiao2021-03-06  80

Precautions for interfaces (self-feeling): Try to define members variables as little as possible, generally only declare the method;

The role of the interface: realize multiple inheritance and polymorphism;

The role of the internal class: 1. Hide implementation.

2. Implement multiple inheritance of class C (compared to multiple inheritage of interfaces, internal categories can achieve multiple inherits of multiple abstract classes)

转载请注明原文地址:https://www.9cbs.com/read-108346.html

New Post(0)