Dear All,

saya punya persoalan yg sama dengan :
http://forum.java.sun.com/thread.jspa?threadID=716459&tstart=0

ada reply pada soalan itu, namun saya kurang paham :(
mungkin rekan ada yg bisa share beberapa contoh sederhana ?!

trims


yanu


===
I’ve browsed the forums here for some information relating to my problem,
and I’ve come across a lot of information on Comparators / Linked lists /
Hash tables etc. Suffice to say I’m a bit confused, and thought it might
be helpful if i describe my simple problem, and someone can point me in
the right direction.

    The array is like this
    {
    {1, 0.4} ,
    {2, 0.6},
    {3, 0.1},
    {4, 0.9}
    }

    And i simple want to sort the array by the 2nd column, while retaining
the linkage to the 1st column.

    So the output should be like this:
    {3, 0.1}
    {1, 0.4}
    {2, 0.6}
    {4, 0.9}

    What’s the best way to go about this? Or possibly, what is the
simplest way to go about this? It needn’t be the most elegant solution
in the world as it’s not for a commercial application etc.

    Any help is very much appreciated, thanks.


-- 
Berhenti langganan: [EMAIL PROTECTED]
Arsip dan info: http://linux.or.id/milis

Kirim email ke