如下是一些有一些强有力的理由:一种对那些在同一个地方使用的接口进行逻辑上分组;封装思想的体现;嵌套接口可以增强代码的易读性和可维护性;在Java标准库中使用内部接口的一个例子是java.util.Map和Java.util.Map.Entry。这里java.util.Map同样被当成命名空间使用。Entry并不属于全局作用域范围,which means there are many other entities that are Entries and are not necessary Map’s entries. This indicates that Entry represents entries related to the Map。