This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with sorting an array...

 
Brandi Love
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure this line is correct:

That's not the array you want sorted, is it?
 
Brandi Love
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
*smacks self on forehead*
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic