[java]代码库方法1
HashMap questionMap = new HashMap();
for(int i=0;i
for(int j=0;j
if(listMyQuestionDisplay.get(i).getId()==listData.get(j).getQuestionType().getId()){
questionMap.put(listMyQuestionDisplay.get(i).getId(), listMyQuestionDisplay.get(i).getQuestionTypeName());
}
}
}
listMyQuestionDisplay.clear();
for (String key : questionMap.keySet()) {
DisplaceQuestionTypeEntity myQuestionDisplay = new DisplaceQuestionTypeEntity();
myQuestionDisplay.id=key;
myQuestionDisplay.questionTypeName=questionMap.get(key);
listMyQuestionDisplay.add(myQuestionDisplay);
}
方法2
for(int i=0;i
for(int j=i+1;j
if(ii.get(i).id==ii.get(j).getId()&&ii.get(i).publicid==ii.get(j).publicid){
score=ii.get(j).getScore()+ bookList.get(i).getScore();
bookList.get(i).setScore(score);;
bookList.remove(j);
j=j-1;
}
}
}