Originally Posted by
Norm
The error occurred at line 8 in the SortSalon class. What is the code for that class?
Has the salonList array been given values? Besides defining the array, you must assign a value to each element in the array.
The SalonList array had not been given values, and that was in fact my problem! I was figuring this out right at the time of your posting, glad to have the solution confirmed. Thanks!
Originally Posted by
aussiemcgr
Which line is line 8?
Also, unrelated to your problem, but good to know for the future, I noticed you are sending the array as well as the size of the array, as two different arguments, to your priceAscend(...) method. I assume you don't know how to dynamically get the size of an array. The call: salonList.length would return the length (or size) of salonList, so in your case, that statement would return 6. Just something extremely handy to know for the future.
Thanks for the info! I normally would use it, and I always try to look at all available methods for the default java classes and identify useful ones, but I'm taking an online class right now, and it's easier on my teacher if I go ahead and do my work with what is given in the book.