The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
April 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Sorting a two dimensional array

Posted by Sindhu on August 15, 2001 at 12:21 PM

Can I use Arrays.sort (str) for sorting a two dimensional array str?

> You can use sort method of Arrays class. For example,

> // Create String array
> String[] str = new String[10] ;

> // POpulate the array
> ...

> // Sort it
> Arrays.sort ( str ) ;

> You need to import java.util package to use Arrays class.






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us