Search:

Type: Posts; User: Norm

Search: Search took 0.12 seconds.

  1. Replies
    6
    Views
    979

    [SOLVED] Re: Sorting with a comparator

    Does that compile? Where is the method: getField() defined in the Object class?
  2. Replies
    6
    Views
    979

    [SOLVED] Re: Sorting with a comparator

    Yes, most objects hold fields. You need to explain a bit more.
    Can you post an example of a class definition that will be used to create an object that will be held in the ArrayList?
    And say what...
  3. Replies
    6
    Views
    979

    [SOLVED] Re: Sorting with a comparator

    What do you mean when you say "objects"? An ArrayList can only contain objects, not primitives.
    How is the ArrayList defined? What type of object does it hold?
    How can a Comparator compare two...
Results 1 to 3 of 3