1public static Rand searchCount (int[] x)
2{
3 int a ;
4 int b ;
5
6 ...
7
8 for (int l= 0; l<x.length; l++)
9 {
10 if (x[l] == 0)
11 a++ ;
12 else if (x[l] == 1)
13 b++ ;
14 }
15
16 ...
17
18}
19