Your class name is a number.
A number is not a valid class name and that's why your code don't will be compiled.
The problem is here:
for (int p=0; p<digitpercentage.length; p++) {
digitpercentage [p] = calculateLeadingDigit (int numbers [i])/numbers.length;
}
You need to change it into this:
for (int p=0; p<digitpercentage.length; p++) {
digitpercentage [p] = calculateLeadingDigit ((int) numbers [p])/numbers.length;
}
You're using the variable
p
in your loop and not
i
.
And there was a syntax error at the casting.