Snippet 1
import Collections
ArrayList< int > a = new ArrayList();
a.add(1);
a.add(3);
a.add(2);
a.add(-3);
ArrayList< int > sorted = Collections.sort(a);
Snippet 2
//METHOD RETURNS VOID
Collections.sort(arrayList);
Similar Snippets
Creating Java Main Method Code Example – java
Find Duplicates In Arraylist Java Code Example – java
Java Creat A Folder Code Example – java
Copyright © Code Fetcher 2020