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

Thread: PLEASE CAN ANYONE GIVE ME AN IDEA HOW TO FIN FIFTY BIGGEST NUMBER IN THE ARRAY.

  1. #1
    Junior Member
    Join Date
    Feb 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default PLEASE CAN ANYONE GIVE ME AN IDEA HOW TO FIN FIFTY BIGGEST NUMBER IN THE ARRAY.

    PLEASE CAN ANYONE GIVE ME AN IDEA HOW TO FIN FIFTY BIGGEST NUMBER IN THE ARRAY.


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: PLEASE CAN ANYONE GIVE ME AN IDEA HOW TO FIN FIFTY BIGGEST NUMBER IN THE ARRAY.

    Welcome to the Forum! Please read this topic to learn how to post code correctly and other useful tips for newcomers.

    Please don't type in all caps, ever, unless maybe there's an elephant standing on your foot, then call another forum.

  3. #3
    Member
    Join Date
    Dec 2013
    Posts
    40
    My Mood
    Amazed
    Thanks
    2
    Thanked 11 Times in 11 Posts

    Default Re: PLEASE CAN ANYONE GIVE ME AN IDEA HOW TO FIN FIFTY BIGGEST NUMBER IN THE ARRAY.

    If I understand your question correctly, you want to write a program to find the maximum number in an array? Left alone, I have two approaches:
    1. Use the sort method of the Arrays class from the java.util package and then pick up the last element from the array; or

    2. Use the max method of the Collections class.

    Your choice!
    Who holds the KEY to all knowledge?

  4. #4
    Member
    Join Date
    Feb 2014
    Location
    India
    Posts
    47
    My Mood
    Bored
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Default Re: PLEASE CAN ANYONE GIVE ME AN IDEA HOW TO FIN FIFTY BIGGEST NUMBER IN THE ARRAY.

    Sorting the array will allow you to get as many "biggest" numbers as you want.In case you want to get top 50 numbers from an array.

Similar Threads

  1. Find the biggest number
    By lolol in forum Java Theory & Questions
    Replies: 4
    Last Post: January 9th, 2014, 08:49 AM
  2. How to find where the biggest number is in an array
    By Jazz26 in forum What's Wrong With My Code?
    Replies: 7
    Last Post: May 2nd, 2013, 06:07 AM
  3. How do you add a value to a 2-d array by row number and column number?
    By JohnEliot in forum Java Theory & Questions
    Replies: 1
    Last Post: April 14th, 2013, 06:39 AM
  4. How do I return the current number of trades(number) from an array?
    By lovely92 in forum What's Wrong With My Code?
    Replies: 4
    Last Post: December 12th, 2012, 06:15 PM
  5. Find Biggest Number in Array
    By jo15765 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: May 12th, 2012, 03:01 PM