array of objects

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • asansol
    New Member
    • Dec 2007
    • 1

    #1

    array of objects

    iam new to java and i have been trying to do a sorting programme.the scenario something like this....
    the names and marks will be given at the time of object creation..each object in the array will represent a different candidate and values will get collected in the constuctor..the marks will be kept in an array.....this is where i got blocked.can any one help me out?
  • BigDaddyLH
    Recognized Expert Top Contributor
    • Dec 2007
    • 1216

    #2
    Originally posted by asansol
    iam new to java and i have been trying to do a sorting programme.the scenario something like this....
    the names and marks will be given at the time of object creation..each object in the array will represent a different candidate and values will get collected in the constuctor..the marks will be kept in an array.....this is where i got blocked.can any one help me out?
    It sounds like the marks are separate from the candidate's name. They need to be combined in a single object. Then follow this tutorial:

    Sorting tutorial

    Comment

    • BigDaddyLH
      Recognized Expert Top Contributor
      • Dec 2007
      • 1216

      #3
      Or are you saying that each candidate object has its own array of marks? Perhaps an example would clarify things.

      Comment

      Working...