Results 1 to 3 of 3
  1. #1
    senthil_jr is offline Member
    Join Date
    Jun 2008
    Rep Power

    Default Collections Sort

    Hi All,

    Thankx in advance for answring this
    please gimme a sample code f

    how to make this query into java collections sorting as java program

    SELECT *
    FROM authors
    ORDER BY au_lname ASC, au_fname AS, au_mname dsc

    CAN USE THE JAVA BEAN AND beanproperties

  2. #2
    Zosden's Avatar
    Zosden is offline Senior Member
    Join Date
    Apr 2008
    Rep Power


    Nobody is going to write it for you but I'll give you some ideas. Put your objects into a vector and make sure that you have a method in your class for that object that has the comparable method, which tells how to compare the object. I think but could be wrong pass in the vector into Arrays.sort or there might be vector.sort, look in the api that should do it for yeah.
    My IP address is

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Colombo, Sri Lanka
    Blog Entries
    Rep Power

Similar Threads

  1. How to sort a list using Bubble sort algorithm
    By Java Tip in forum Algorithms
    Replies: 3
    Last Post: 04-29-2008, 08:04 PM
  2. Replies: 0
    Last Post: 04-16-2008, 10:39 PM
  3. Collections framework
    By yuvi461 in forum New To Java
    Replies: 2
    Last Post: 01-08-2008, 10:46 AM
  4. Performance Of Collections
    By thomasprabu in forum Advanced Java
    Replies: 0
    Last Post: 01-05-2008, 11:17 AM
  5. how to sort
    By Feng in forum New To Java
    Replies: 1
    Last Post: 11-20-2007, 06:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts