如果内心为conditoin继续给我反馈

时间:2016-12-19 11:45:01

标签: java android android-studio arraylist hashmap

我想通过一个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.我在这里缺少的是什么!?

0 个答案:

没有答案