Difference between revisions of "Overview of Arrays"

From CompSciWiki
Jump to: navigation, search
Line 1: Line 1:
(Graham)
+
{{1010Topic}}
 
+
This section will discuss how to [[Creating Arrays|create arrays]], [[Entering and Using Array Elements|use elements in arrays]], as well as other various topics listed in the index.
+
 
+
Arrays are important in Java, since they can be used to store multiple pieces of data.  You can at any time add, edit, or modify the elements within an array.  In addition, you can at any time remove the elements from the array.
+
 
+
You can think of an array as a table of contents for a book.  The array contains the exact location of the data you "insert" into it, so you can access it at any time.  You can also modify elements contained in an array outside of the array, and both copies will be simultaneously changed.
+
 
+
Arrays have many things you need to consider when using, such as that you can never change the length of an array without losing the elements inside of an array.  In addition, you may not ask for elements past the end of an array.  We will discuss these and more in further detail later in the chapter.
+

Revision as of 16:08, 15 March 2007

COMP 1010 Home > Back to Chapter Topics


{{{Body}}}