package com.soapuitutorial.propertie;
public class ArrayCount {
public static void main(String[] args) {
int[] x = { 1, 3, 4, 5, 6, 3, 2, 4, 6, 7, 9, 4, 12, 3, 4, 6, 8, 9, 7,
6, 4, 3, 2, 4, 7, 7, 5, 2, 1, 3, 4, 6, 3, 1, 1 };
int count = -1;
int biggestNumber = 0;
for (int i = 1; i < x.length; i++) {
if (x[i] > biggestNumber)
biggestNumber = x[i];
}
// System.out.print(x[i]+",");
for (int i = 0; i <= biggestNumber; i++) {
for (int j = 0; j <= x.length - 1; j++) {
if (x[j] == i) {
count++;
// System.out.println(x[i] + " " + i+" "+count);
}
}
if (count < 0) {
} else {
System.out.println(i + "- Repeated " + count + " times");
}
count = -1;
}
}
}