Urgent - Array

Posted on 2006-05-19
Last Modified: 2010-03-31

I have a 2 d array which has the values.

How do i sort the values starting from the lowest to the highest...

the values in years 0 needs to be resorted from the lowest to highest
so does, year 1 ,pls hlep

               Iterations 1   Iteratons 2   Iterations 3
Years   0       2.666667       2.66667         2.66667  
Years   1       3.2224           3.2221          3.4
Years   2         3.7           3.8            3.9
Years   3       3.9            4.2               2.7
Question by:Jasbir21
    LVL 92

    Accepted Solution

    Sort each row in your array:

    for (int i=0; i<score.length; i++)

    Author Comment

    is there a way of putting it into a list and then sort the list ?

    something like maps ...
    LVL 92

    Expert Comment

    whats your desired result?

    Author Comment

    sorry..just saw this...actually, i used maps before, i thought to sort, need list ..

    Featured Post

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
    By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
    Video by: Michael
    Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
    Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now