1.

Does Objective C have multiple inheritances? Why not? How to imitate various inheritances?

Answer»

Objective-C does not SUPPORT multiple inheritances. You’ll use a protocol, COMPOSITION and message forwarding to attain a similar result.

Multiple inheritances allow a category to INHERIT behaviors and OPTIONS from over one parent. However, issues will arise with multiple inheritances as a result of it permits for ambiguities to occur. Because of this, Objective-C will don’t implement various inheritances.



Discussion

No Comment Found