Sort a byte array.

import java.util.Arrays;
public class Hello {
public static void main(String[] args) {
byte k[]={3,2,6,9,1};
Arrays.sort(k);
for(int i=0;i System.out.println(k[i]);
}
}
}

No comments: