Hi All -
I'm having a bit of a problem: My assignment is to enter an array of numbers and then sort them using bubble sort. I have got the bubble sort working(finally), but I also have to do four things: show the unsorted array before sort, show the unsorted array after it has been sorted; show how many passes; and show how many swaps. Right now, I've only gotten so far as sorting, I haven't even touched the counter yet, which is not what I'm asking about (yet) because I haven't worked on it. What I am asking about, though, is help with the problem I'm currently having. I have gotten the sorted array to print, but I can't seem to get the array to print before the sort. My code is below. Does anybody have any idea how to get the program to show the array before it's sorted?
It compiles correctly somehow, but when I run it this is what I get:
Before sorting, the list elements are:
[I@66848c
After sorting, the list elements are:
5 12 17 23 38 44 77 84 90
Any help I could get would be appreciated.
Thanks,
Kat