You could define callFriend this way: public <T extends Animal> T callFriend(String name, Class<T> type) { return ...
確定! 回上一頁