Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: how to sort objects with collections???

  1. #1
    Junior Member
    Join Date
    Oct 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question how to sort objects with collections???

    http://rapidshare.com/files/428176852/my_assignment.rar


    I must finish that horrible assignment tomorrow.What I must do is to use collections.sort method for sorting the course objects by their course codes.I did everything but couldn't do.plz help me if you can sort them,or tell me how to sort.here is the corresponding part of my assignment:


    4. Include 2 sorting options that user can choose: one by course code and one by lecturer name AND surname. Both options should be in ascending order and you should use Collections.sort method. ListBox and TextArea should be updated to display the courses in selected order.


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: how to sort objects with collections???

    Object Ordering (The Java™ Tutorials > Collections > Interfaces)

Similar Threads

  1. bubble sort and selection sort on strings
    By Sir Saula in forum What's Wrong With My Code?
    Replies: 5
    Last Post: July 3rd, 2010, 09:44 AM
  2. Fill & sort an array
    By yroll in forum Collections and Generics
    Replies: 2
    Last Post: April 1st, 2010, 06:00 AM
  3. Hibbard Shell Sort
    By biglandphil in forum Algorithms & Recursion
    Replies: 3
    Last Post: November 12th, 2009, 10:14 PM
  4. Help with Sort arrays
    By drk in forum Collections and Generics
    Replies: 5
    Last Post: September 6th, 2009, 02:48 AM
  5. Replies: 10
    Last Post: June 22nd, 2009, 07:45 AM