I have a sorting method created in a class separate from the class I am currently working in. The sorting method is a public static void method named:
public static void sortSelection(Comparable[] array, int n)
In the class where I currently work, entitled "Library", I wish to call upon this method as part of a different sorting method which I simply call "sort". So, I have written as follows:
public void sort() {
sortSelection(CDCollection, numberOfCDs)
}
where CDCollection is an array, and numberOfCDs is an integer. However, I get the error message:
"The method sortSelection(CD[], int) is undefined for the type Library"
If anyone knows whay may cause this error, I would greatly appreciate it!