We know that Map interface does not implement Collection interface. Then what does Map implement or extend? Does it extend Object class directly?
Related question: Why doesn't Java Map extend Collection?
Map
does not extend any interfaces; it is defined as its own interface.
In Java, interfaces don't extend classes , only other interfaces. Technically, all objects in Java extend Object
, so any object implementing an interface is an Object
.
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.