我的课看起来像这样:
public class InformationSystem {
private final ArrayList<Book> books;
private final ArrayList<Reader> readers;
public InformationSystem() {
books = new ArrayList<Book>();
readers = new ArrayList<Reader>();
}
public void addBook(final String author, final String title) {
Book book = new Book(author, title);
books.add(book);
}
}
为什么我可以从最终的数组列表中添加/删除值?