Simple explaination of Arraylists

Posted by Jeremy on Stack Overflow See other posts from Stack Overflow or by Jeremy
Published on 2011-11-12T01:44:42Z Indexed on 2011/11/12 1:50 UTC
Read the original article Hit count: 192

Filed under:
|

I'm new to programming and I'm looking for a simple answer to build my foundation of understanding Arrays. I've used google and searched this site.

After a bit of trial and error I get how to make and reference Arrays like thing[3] gets you the fourth thing in the thing array(since 0 is the first). which lets me do something like thing[3].getStupidNumber() to get the StupidNumber of the 4th thing in the thing array.

Then I get to ArrayLists which seem to have much more utility but I cant make logical sense of them like Arrays. When i search I cant find this or word this correctly and thus far everything else I've learned clicked easily.

so say I make an ArrayList thing with 5 things in it. how do i get to the .getStupidNumber() method inside the fourth thing, if possible? I think if I learn this I can learn the rest on my own.

Thanks!

© Stack Overflow or respective owner

Related posts about java

Related posts about arraylist