jon ninpoja wrote:"The creating of the object and the aadding to the list I would do in my main. "
shouldnt it be in a method though...as what if a want to add,delete,list the teams in my arraylist...isnt that awkward from just main?
jon ninpoja wrote:in the TeamManager class i have a static int variable that will keep track of how many teams have been created
in the TeamManager class i will have the various methods to add a team,minus a team etc etc
ok so a few questions:
where would the best place be to put the arraylist?
shouldnt it be a static arraylist with static methods accessing the arraylist as it will be created and will always keep it in memory and make it available from everywhere in the program?
as what happens when somebody lists a team,and havent created a team yet...the arraylist needs to be initialised first but if i do that in a local scope it wont be able to be used later in the program
thanks for reading looking forward to feedback...
TeamManager.getTeamList method is not available...how can i have it use methods of a class without instantiating the class? surely the arraylist has to be static...or have i got something wrong?