I'm practicing exercises with arrays, I found this
code:
int[] n = {1, 2, 5, 1, 2, 3, 4, 2, 4, 1};
int[] occ = new int[6];
for (int i = 0; i < n.length; i++) {
++occ[n[i]];
}
System.out.println(occ[1]);
System.out.println(occ[4]);
th...
asked by
23.05.2018 / 07:17