Search:

Type: Posts; User: Json

Search: Search took 0.10 seconds.

  1. Replies
    8
    Views
    2,253

    Re: i need some advice ....

    Well, to sort an arraylist you have to pass it to the Collections static method called sort, for this to work the object in the arraylist must implement comparable or you can pass in another...
  2. Replies
    8
    Views
    2,253

    Re: i need some advice ....

    Ok, lets say we wanted to sort by songs instead, lets create a comparator.



    public static class SongComparator implements Comparator<Mp3Info> {

    @Override
    public int...
  3. Replies
    8
    Views
    2,253

    Re: i need some advice ....

    Ok, here we go, lets say we have a separate file/class for the mp3 info.



    public class Mp3Info implements Comparable<Mp3Info> {

    private String artist;

    private String song;
  4. Replies
    8
    Views
    2,253

    Re: i need some advice ....

    Hello and welcome,

    How big array are we talking about?

    You might want to write your self a comparator and sort the array on whatever it is you want to sort it on :D

    // Json
Results 1 to 4 of 4