是不是这个意思 ArrayList<Object> list = new ArrayList<>(); list.removeIf(element -> element instanceof Student);