单选题:在Java中ArrayList类
在Java中ArrayList类实现了可变大小的数组,便于遍历元素和随机访问元素,已知获得了ArrayList类的对象bookTypeList,则下列语句中能够实现判断列表中是否存在字符串“小说”的是?
A.bookTypeList.add("小说");
B.bookTypeList.get("小说");
C.bookTypeList.contains("小说");
D. bookTypeList.remove("小说");
answer:C
A.bookTypeList.add("小说");
B.bookTypeList.get("小说");
C.bookTypeList.contains("小说");
D. bookTypeList.remove("小说");
answer:C