Z
zcraven
I need to sort a football league by the number of points each club has. The
clubs are objects stored in an ArrayList called 'league'. Each club has a
field for the number of points they have.
Can someone suggest the best way to sort this arraylist and output it to
screen?
Most examples on the web suggest I type:
collections.sort(league)
but i get the error that it expects an Array but has found an ArrayList.
PLEASE HELP!
clubs are objects stored in an ArrayList called 'league'. Each club has a
field for the number of points they have.
Can someone suggest the best way to sort this arraylist and output it to
screen?
Most examples on the web suggest I type:
collections.sort(league)
but i get the error that it expects an Array but has found an ArrayList.
PLEASE HELP!