Sorting help needed


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Sorting help needed

  1. #1
    Join Date
    Aug 2006
    Posts
    16

    Red face Sorting help needed

    this is my database
    i want to sort ascending in 1 method for all the fields
    if possible plzz supply a source code
    i am working on different source code for each field now
    the fields and data is correspoonding but in 2 different variables

    DATABASE --

    import java.io.*;
    public class Library
    {
    String titlesb[][] ={
    {"NAME OF BOOK ","AUTHOR OF BOOK ","GENRE ","No. Of COPIES","Book Code"},
    };
    String bookBase[][]={
    {"Computer Application ","Arun Jasuja ","Education "," 03"," A01R3"},
    {"Julius Caesar ","Willium Shakespeare ","Drama "," 05"," A02R1"},
    {"The boy who liked shopping ","Carol Krueger ","Humour "," 02"," A03R2"},
    {"The Sweet Giant ","Ujjwala Ghate ","Mystery "," 06"," A04R4"},
    {"The New Little Tree ","Mahendra Kamlesh ","Humour "," 01"," A05R2"},
    {"Big Bad Bully ","Teddy Slater ","Adventure "," 04"," A06R5"},
    {"The Snow Queen ","Andersan ","Mystery "," 09"," A07R4"},
    {"The Fisherman and The King ","M.P.Jain ","Humour "," 07"," A08R2"},
    {"The Mango Tree ","Sunita Jain ","Adventure "," 12"," A09R5"},
    {"Land Of the Music Machine ","Ane Weber ","Adventure "," 08"," A10R5"},
    {"The Magic Finger ","Roald Dahl ","Humour "," 20"," A11R2"},
    {"A Text Book Of Geography ","Rita Rajen ","Education "," 05"," A12R3"},
    {"Merchant Of Venice ","Willium shakespeare ","Drama "," 07"," A13R1"},
    {"Romeo And Juliet ","Willium shakespeare ","Romance "," 10"," A14R6"},
    {"Robot Takes A Test ","Helen Arnold ","Mystery "," 11"," A15R4"},
    {"How to Deal With Friends ","Richard Powell ","Philosophy"," 02"," A16R7"},
    {"Whispers Of Immortality "," ","Poetry "," 03"," A17R8"},
    {"Hamlet ","Willium Shakespeare ","Tragedy "," 04"," A18R9"},
    {"The Jungle Book ","Rudyard Kipling ","Adventure "," 07"," A19R5"},
    {"Harry Potter [Full] ","J.K.Rowling ","Adventure "," 09"," A20R5"},
    };
    String titlesm[][]={{"Name ","Username ","Borrowed Book Code","Days left","Total Fine","Blackilist Level"},};
    String members[][]={

    {"Husain ","headshot "," A11R2"," 07"," 0"," 00"},
    {"Samrudh ","ronaldinho"," A11R2"," 02"," 100"," 01"},
    {"Akshay ","hellraiser"," A11R2"," 06"," 30"," 00"},
    {"Mufaddal","Devil "," A11R2"," 05"," 60"," 00"},
    {"Huzefa ","undead "," A11R2"," 01"," 70"," 00"},
    {"Tushar ","bookworm "," A11R2"," 04"," 250"," 02"},
    {"Rushil ","gogrgenks "," A11R2"," 00"," 20"," 00"},
    {"Shridhar","uladzimir "," A11R2"," -20"," 900"," 09"},
    {"Hamza ","mindreader"," A11R2"," 01"," 150"," 01"},
    {"Saifudin","destroyer "," A11R2"," -05"," 370"," 03"},
    {"Jatan ","sytemread "," A11R2"," 02"," 200"," 02"},
    {" "," "," "," "," "," "},
    {" "," "," "," "," "," "},
    {" "," "," "," "," "," "},
    {" "," "," "," "," "," "},
    {" "," "," "," "," "," "},
    {" "," "," "," "," "," "},
    {" "," "," "," "," "," "},
    {" "," "," "," "," "," "},
    {" "," "," "," "," "," "},
    };

  2. #2
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    So what would your expected output be if you could "sort ascending in 1 method for all the fields"?

Similar Threads

  1. Replies: 2
    Last Post: 03-22-2006, 04:10 AM
  2. Replies: 3
    Last Post: 07-29-2005, 11:00 AM
  3. Replies: 1
    Last Post: 04-05-2002, 11:18 AM
  4. Sorting for a JTable
    By Ramkumar in forum Java
    Replies: 1
    Last Post: 01-11-2001, 06:32 AM
  5. CrossBrowser DHTML table sorting problem
    By Joel Matto in forum Web
    Replies: 0
    Last Post: 05-02-2000, 04:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center