亲爱的,如果两个值相同,我正在比较 android 中的两个 List 并且返回 true 很好,但我想知道列表字符串之间有多少值是正确的,如果它不匹配如何实现此帮助表示赞赏。下面是我的代码。
List<String> list1 = new ArrayList<String>(i1.values());
///list 1 = [-ful; to be full of; play; playful; full of play]
List<String> acct_Rte_Cdes_A = Arrays.asList(result) ;
///acct_Rte_Cdes_A = [-ful; to be full of; play; playful; full of play]
if (list1.equals(acct_Rte_Cdes_A)) {
// do what you want to do if the string is there
//System.out.println("True");
} else {
System.out.println("False");
}