我想通过一个hashmap并提取其中的每个ArrayList,并将sexith索引与值“thelessonyouneed”匹配
String thelessonyouneed = "Math";
for (int che = 0 ; che < dataofqusations.size(); che++) {
ArrayList<String> datatobe = (ArrayList<String>) dataofqusations.get(String.valueOf(che));
if (thelessonyouneed == datatobe.get(6)) {
System.out.println(che);
} else {
System.out.println("No match");
}
};
out out给了我错误的信息
I/System.out: No match
I/System.out: No match
I/System.out: No match
I/System.out: No match
I/System.out: No match
I/System.out: No match
I/System.out: No match
I/System.out: No match
I/System.out: No match
I/System.out: No match
I/System.out: No match
I/System.out: No match
I/System.out: Match
正确的信息应该是所有索引,除了2.我在这里缺少的是什么!?