| public class Demo { public static void main(String[] args) {
 int[] arr={2,2,3,3};
 fun_1(arr);
 }
 public static void fun_1(int[] arr){
 List<Integer>list =new ArrayList<>();
 HashMap<Integer, Integer>map=new HashMap<>();
 for(Integer in :list){
 if(map.containsKey(in)){
 map.put(in, map.get(in)+1);
 }else{
 map.put(in, 1);
 }
 }
 //标识位置
 boolean flag = false;
 for(Integer  s:map.keySet()){
 Integer value=map.get(s);
 if(value==1){
 flag=true;
 System.out.println(s);
 }
 }
 if(!flag){
 System.out.println("没有符合条件的数字");
 }
 
 
 }
 }
 
 |