What is error in my code
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner cin = new Scanner(System.in);
int n = cin.nextInt(), arr[] = new int [n];
for(int i =0;i<arr.length;i++){
arr[i] = cin.nextInt();
}
int max = 0;
for(int i = 0;i<arr.length;i++){
if(max < arr[i]){
max = arr[i];
}
}
CountSort(arr,arr.length,max);
for(int ar : arr){
System.out.print(ar);
}
}
public static void CountSort(int [] arr,int n, int max){
n = arr.length;
int count[] = new int[max+1];
for(int i = 0;i<arr.length;i++){
++count[arr[i]];
}
for(int i = 1; i<=max; i++){
count[i] = count[i] + count[i+1];
}
int b[] = new int[n];
for(int i = n-1;i>-1;i++){
b[–count[arr[i]]] = arr[i];
}
for(int i =0;i<arr.length;i++){
arr[i] = b[i];
}
}
}