Sorting of String Array using Java

Here is the code snippet for sorting
  1. import java.util.Arrays;  
  2. public class Sorting   
  3. {  
  4.     public static void main(String args[])   
  5.     {  
  6.         String[] strNames = new String[]   
  7.         {  
  8.             "Beans""Jelly""Drive""Language""Mark""Run"  
  9.         };  
  10.         Arrays.sort(strNames);  
  11.         System.out.println("String array after sorting:");  
  12.         for (int i = 0; i < strNames.length; i++)   
  13.         {  
  14.             System.out.println(strNames[i]);  
  15.         }  
  16.     }  
  17. }
Thank you, keep learning and sharing