New To Java - ArrayList

Hey,

i have written a class called Player which takes various information age, height, weight etc

i want to write an ArrayList in a new class which maintains the information about all the players. If possible add and remove players also.

any suggestions or help would be greatly appreciated

thanks

[328 byte] By [] at [2007-11-26 23:16:05]
# 1

import java.util.*;

public class Club { //wild guess

private List < Player > players = new ArrayList < Player > ();

...

}

http://java.sun.com/docs/books/tutorial/collections/index.html

DrLaszloJamfa at 2007-7-10 14:16:19 > top of Java-index,Java Essentials,New To Java...
# 2
thankshow would i go about writing add and remove player methods?
DrLaszloJamfa at 2007-7-10 14:16:19 > top of Java-index,Java Essentials,New To Java...
# 3
It's got to take more time to read the collections tutorial than that.Once you've read it, you'll know all you need to know.
DrLaszloJamfa at 2007-7-10 14:16:19 > top of Java-index,Java Essentials,New To Java...