The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
September 2000

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:

Java 2D sorting

Posted by jegan g karuanakaran on November 30, 2000 at 11:51 AM

Hi,

I have a question on multidimensional array sorting in Java.

In an array of size[n][6] where n varies from 0 to many
i want to sort this array BY ROW VISE according to the value in the 6th column

for example

desc[0][0] ="do";
desc[0][1] ="Sync";
desc[0][2] ="Business";
desc[0][3] ="instance";
desc[0][4] ="1.0";
desc[0][5] ="do
Sync
Business
instance
1.0";


desc[1][0] ="donot";
desc[1][1] ="ASync";
desc[1][2] ="System";
desc[1][3] ="instanceLevel";
desc[1][4] ="1.2";
desc[1][5] ="donot
ASync
System
instanceLevel
1.2";


desc[2][0] ="don";
desc[2][1] ="ASyc";
desc[2][2] ="SystemLevel";
desc[2][3] ="instanceKind";
desc[2][4] ="2.2";
desc[2][5] ="don
ASyc
SystemLevel
instanceKind
2.2";

i want to sort all three rows , according to the value in the 6th column.

is it possible in Java sort method?


Jegan G Karunakaran





Replies:

Sponsored Links



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