import java.util.Arrays;
import java.util.Collections;
class CollectionTest
{
public static void main ( String[] args )
{
String[] array = { “Mercury”, “Venus”, “Earth”, “Mars”, “Jupiter”, “Saturn” } ;
Arrays.sort( array );
System.out.println( Arrays.toString( array ) );
Arrays.sort( array, Collections.reverseOrder() );
System.out.println( Arrays.toString( array ) );
}
}