已知数据手机号数组:
String[] phones = {"13804010040","13804010041","13804010042",
"13804010043","13804010044","13804010045",
"13804010046","13804010047","13804010044",
"13804010054","13804010055","13804010056",
"13804010058","13804010059","13804010060",
"13804010061","13804010062","13804010063",
"13804010064","13804010065","13804010066",
"13804010067","13804010068","13804010069",
"13804010070","13804010071","13804010072",
"13804010073","13804010074","13804010075",
"13804010045","13804010057","13804010063",
"13804010058","13804010069","13804010066"}
1使用集合,快速去除重复的手机号,将去重后手机号存
放的List集合中,输出去重后有多少个手机号,13804010099这个手机号是否存在
2已知上面手机号数组,将数组转为集合,然后使用map集合存储每个手机号出现的次数,并遍历输出
安浪创想
相关分类