The compiler doesn’t know the exact type of the setFirst method but can call it with any
object of type Manager, Employee , or Object , but not a subtype such as Executive . However, if you call getFirst , there is no guarantee about the type of the returned object. You can only
assign it to an Object. (查看原文)