Array's do not have methods. You will need to define the compare() method in an existing class and pass it the array as an argument.