看板
[ java ]
討論串[問題] 字串計數
共 8 篇文章
內容預覽:
1. 使用TreeMap, key: 字串 value:顯示次數. 2. 在Constructor裡面寫Comparator,並Override compare method. 把你要的logic寫入. 3. for each所有String array,插入TreeMap,. if 已經插入 va
(還有259個字)
內容預覽:
依照推文說可用 map. key 使用字串值,value 使用number計數. 回傳list用 map 的 Entry 當泛型類別. 排序用 Collections 的 sort 實作. * 什麼是 Map: http://ppt.cc/WlxT. * 什麼是 Entry: http://ppt.
(還有64個字)