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 5 of 5

Thread: How to get the list of highest score

  1. #1
    Junior Member
    Join Date
    Jul 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to get the list of highest score

    Hi to all,

    I am doing a program in java that will get the highest scores of the students and returns in list.
    Example:
    StudentA : 90
    StudentB : 90
    StudentC : 80
    StudentD : 70

    The result of this should return StudentA and StudentB in java list.
    Sorry for my poor english.
    Hope can anyone will help me and it will be greatly appreciated.

    Regards


  2. #2
    Forum old-timer
    Join Date
    Nov 2008
    Location
    Faversham, Kent, UK
    Posts
    471
    My Mood
    Mellow
    Thanks
    4
    Thanked 58 Times in 54 Posts

    Default Re: How to get the list of highest score

    What part of this task is causing you difficulty?

  3. #3
    Junior Member
    Join Date
    Jul 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: How to get the list of highest score

    Hello, thanks for your promp response.
    I am newbie in java. Could you please give me sample code to solve this problem?
    Thanks in advance.

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,195
    Thanks
    49
    Thanked 2,172 Times in 2,145 Posts

    Default Re: How to get the list of highest score

    Sorry, we here to help you learn programming. Ask questions about your code or program.
    Use Google or any other Search to find sample code.

  5. #5
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: How to get the list of highest score

    public class HighScore
    {
         public static void main(String[] args)
         {
              // TODO: insert code here
         }
    }

    A simple way to find all of the highest scores is to sort the students by their score, then return a list of all those who's score matches the first student's score (since they should have the highest score)

  6. The Following User Says Thank You to helloworld922 For This Useful Post:

    Json (July 5th, 2010)

Similar Threads

  1. list in JSP
    By smackdown90 in forum JavaServer Pages: JSP & JSTL
    Replies: 2
    Last Post: November 13th, 2011, 12:08 PM
  2. Help with score board!
    By vlan in forum Java Applets
    Replies: 0
    Last Post: June 2nd, 2010, 04:34 AM
  3. Finding the highest number in an array?
    By halfwaygone in forum Algorithms & Recursion
    Replies: 1
    Last Post: April 17th, 2010, 03:56 PM
  4. Averages, Highest & using a .csv file ! ? ! ?
    By thebigtimeGNAR in forum Java Theory & Questions
    Replies: 3
    Last Post: April 14th, 2010, 11:35 AM
  5. Inputing file (.txt) and finding the highest number in the file
    By alf in forum What's Wrong With My Code?
    Replies: 3
    Last Post: March 15th, 2010, 09:11 AM