Results 1 to 1 of 1
Thread: Sorting an array of Strings
-
Sorting an array of Strings
Java Code:import java.util.Arrays; public class StringSorting { public static void main(String[] args) { String[] sa = new String[] { "d", "e", "a", "c", "g" }; System.out.println("Before sorting: " + Arrays.asList(sa)); Arrays.sort(sa); System.out.println("After sorting: " + Arrays.asList(sa)); } }"The sole cause of man’s unhappiness is that he does not know how to stay quietly in his room." - Blaise Pascal
Similar Threads
-
sorting problem...
By mark-mlt in forum New To JavaReplies: 4Last Post: 04-17-2008, 02:15 PM -
Converting array to list and sorting it
By Java Tip in forum java.langReplies: 0Last Post: 04-16-2008, 10:36 PM -
Sorting, Searching, and Inserting into a sorted array
By Java Tip in forum java.langReplies: 0Last Post: 04-14-2008, 08:39 PM -
Heap Sorting
By kesav2005 in forum New To JavaReplies: 1Last Post: 11-13-2007, 04:04 PM -
sorting JTable
By mansi_3001 in forum Advanced JavaReplies: 3Last Post: 08-10-2007, 06:29 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks