Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sorting an integer array(ascending order)

 
Chaturaka Gunatilaka
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
int x[]={3,7,4,9,21,5}

How to sort the above array into int y[]={3,4,5,7,9,21} without using java.util.*;?
Thank you.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64990
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have you tried so far? What problems are you having with it?
 
Campbell Ritchie
Sheriff
Pie
Posts: 49466
64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic