Tabelle mit quicksort alphabetisch sortieren

S

Sarah

Hallo!

Kann mir vielleicht einer sagen wie ich eine Tabelle auf einer
jsp-Seite alphabetisch mit Quicksort oder ähnlich sortieren und dann
auf dem Bildschirm ausgeben kann? Es handelt sich dabei um eine
Tabelle die z.B. Namen, Mailadressen usw. aus dem VIP Gauss ausliest.

Vielen Dank schon einmal!
 
D

David Baer

Eine tabelle zu sortieren macht nicht sehr viel sinn. du kannst nur nach
kolonnen sortiern - also arrays. dazu brauche
java.util.Arrays.sort(Object[])

die Objekte sollten comparable implementieren. falls deine tabelle nach
zeile zuerst aufgebaut ist (tabelle[zeile][spalte]) musst du zuerst eine
spalte in ein array kopieren, dann sortieren.
danach aufpassen, dass die anderen spalten mit der sortierten weiterhin
übereinstimmen!

david
 
R

Roedy Green

Eine tabelle zu sortieren macht nicht sehr viel sinn. du kannst nur nach
kolonnen sortiern - also arrays. dazu brauche
java.util.Arrays.sort(Object[])

Just took one year of German 40 years ago, so I won't pretend I
understand your question. Have a look in
http://mindprod.com/jgloss/sort.html for a list of alternatives to the
Sun sort if for some reason it is not acceptable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top