aspose file tools*
The moose likes Beginning Java and the fly likes problem with sorting an array... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "problem with sorting an array..." Watch "problem with sorting an array..." New topic
Author

problem with sorting an array...

Brandi Love
Ranch Hand

Joined: Sep 19, 2003
Posts: 133
This program is supposed to take values from a 4 by 5 array and put them into a one dimensional array. It is then supposed to sort the one dimensional array, and print the individual values. I've got the program so that it creates the one dimension array, but after I added Arrays.sort I get this at the command line when I try to run it:

Heres my code:

Anyone have any idea whats going on here and as to how I might fix my code so it works?
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
Are you sure this line is correct:

That's not the array you want sorted, is it?
Brandi Love
Ranch Hand

Joined: Sep 19, 2003
Posts: 133
*smacks self on forehead*
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: problem with sorting an array...