Search:

Type: Posts; User: bczm8703

Search: Search took 0.13 seconds.

  1. Replies
    5
    Views
    2,341

    [SOLVED] Re: sorting only 1 column of 2D array

    thanks for all the help... think the error i 1st encounter is my stupid self trying to display a shorter version of my array.. did not realise that the value is hidden in the array index i did not...
  2. Replies
    5
    Views
    2,341

    [SOLVED] Re: sorting only 1 column of 2D array

    Weird... As stated in my first post. I tried your method and did not get your result. Will check where I did wrong
  3. Replies
    5
    Views
    2,341

    [SOLVED] Re: sorting only 1 column of 2D array

    double[][] a1 = new double[][] {{2.5,3.6,0.7,0.01},{0.85,1.32,0.20,0.992}};

    based on this the output after sorting should be
    a1[0][0] = 0.01 a1[1][0] = 0.20
    a1[0][1] = 0.7 a1[1][0] =...
  4. Replies
    5
    Views
    2,341

    [SOLVED] sorting only 1 column of 2D array

    hi.. i am trying to sort my 2D array such that only the 2nd column get sorted.. i tried to use Arrays.sort(arr[a]) but it seem to sort the whole array

    example of what i want:
    before sort...
Results 1 to 4 of 5