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 add one method to printed like "public void printHist(int[]hist)"
and then in the main method you need to instantiated the class to an object, then calling both method
public static void main(String []ag){
int arr[]=new in arr[fixedNumber];//define
int hist[]=new int[fixedNumber];
NewClass a= new NewClass();
hist=a.arrayHist(arr);
a.printHist(hist);
}