ath*_*esh 2 java
我有一个字符串arraylist
ArrayList<String> data = new ArrayList<String>();
我已经存储了字符串值.现在我想做点什么
data.get(0) == "a" // (need to compare)
我能怎么做?请帮忙.
mic*_*man 6
用于list.contains(Object o)检查列表是否包含String.用于比较String使用"a".equals(list.get(0))方法.
list.contains(Object o)
String
"a".equals(list.get(0))
归档时间:
15 年,3 月 前
查看次数:
12296 次
最近记录:
13 年,4 月 前