Skip to content

Instantly share code, notes, and snippets.

@scriptnull
Last active December 29, 2015 02:49
Show Gist options
  • Save scriptnull/7603519 to your computer and use it in GitHub Desktop.
Save scriptnull/7603519 to your computer and use it in GitHub Desktop.
using Collection.sort(List<T> ) method as key ingredient , sorting becomes no hard job ! :)
import java.util.*;
public class SortArrayOneStep {
public static void main(String[] args) {
Integer[] arr = {5,4,3,2,1};
printArray(arr);
Arrays.sort(arr);
printArray(arr);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment