java中用for循环求一个数组中出现最多次数的元素答:// 测试数组int[] array = {2,4,6,8,2,5,8,2,10};HashMap<Integer, Integer> hashMap = new HashMap<Integer, Integer>();for (int i : array) {hashMap.put(i, hashMap.get(i) == null ? 0 :hashMap.get(i)+1);}Set<Integer> keySet = hashMap.keySet();int maxKey =...