Discuss / Java / 作业

作业

Topic source

lihtao_me

#1 Created at ... [Delete] [Delete and Lock User]
int getScore(String name) {   // 先在Map中查找,如果没有,则到List中查询,然后放入到Map中:   Integer score = this.cache.get(name);   if (score == null) {      // TODO:      score = findInList(name);      cache.put(name,score);   }   return score == null ? -1 : score.intValue();}

  • 1

Reply