This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes array and arraylist Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "array and arraylist" Watch "array and arraylist" New topic
Author

array and arraylist

auvrm papu
Ranch Hand

Joined: Sep 01, 2005
Posts: 105
what is the difference between array and arraylist?

thanks
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 43986
    
  33
The short answer is that an array has a fixed capacity, whereas an ArrayList can change its capacity as required.

Arrays are set up without using a special class; ArrayLists (capital A and L) are set up using the java.util.ArrayList class.

You can find out about arrays here in the Java tutorial, and about ArrayLists in the API specification or here in the Java tutorial.

CR
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: array and arraylist
 
jQuery in Action, 3rd edition