static method like yours "public static int[] arrayHist(int[] arr)" can be used in a dynamic method main
you need to change the method like this public int[] arrayHist(int[] arr)
and then you can...