Last active
December 29, 2015 02:49
-
-
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 ! :)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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