解一道java数组的题,大神们求指点

创建一个长度为10的整形数组,并使用随机数赋值.
求出其中的偶数,奇数
偶数的个数的和
奇数的个数的和


 public static void main(String[] args) {
      int[] arr = new int[10];
        Random r = new Random();
        int count=0;
        for(int i=0;i<10;i++){
            arr[i] = r.nextInt(100);
            if(arr[i]%2==0){//符合条件则为偶数
                count++;
                System.out.println(arr[i]+"为偶数");
            }else{
                System.out.println(arr[i]+"为奇数");
            }
        }
        System.out.println("偶数的个数为:"+count+",奇数的个数为:"+(10-count));
    }

输出结果:
66为偶数
12为偶数
83为奇数
70为偶数
8为偶数
63为奇数
48为偶数
29为奇数
92为偶数
93为奇数
偶数的个数为:6,奇数的个数为:4