-
April 2nd, 2012, 09:27 PM
#1
What can I do to be able to use Getter and Setter meths with ArrayList
I'd like to use getter and setter methods I wrote in my Nation class with ArrayList, but it doesn't work. ArrayList doesn't behave like an array.
list[i].getCapitol(); doesn't work
I somewhat found a way around it, but I need to use arrays and stuffs like that, but I think the teacher wants me to only use ArrayLists.
Any suggestion?
I am a newbie.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|