Busy. Please wait.
or

show password
Forgot Password?

Don't have an account?  Sign up 
or

Username is available taken
show password

why


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
We do not share your email address with others. It is only used to allow you to reset your password. For details read our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
Don't know
Know
remaining cards
Save
0:01
To flip the current card, click it or press the Spacebar key.  To move the current card to one of the three colored boxes, click on the box.  You may also press the UP ARROW key to move the card to the "Know" box, the DOWN ARROW key to move the card to the "Don't know" box, or the RIGHT ARROW key to move the card to the Remaining box.  You may also click on the card displayed in any of the three boxes to bring that card back to the center.

Pass complete!

"Know" box contains:
Time elapsed:
Retries:
restart all cards
share
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

Chapter 8

Arrays

TermDefinition
Array A named list of data items that all have the same type
Element Each data item in an array
Declaring Arrays Ex1: double[] salesFigrues = new double[20];... Ex2: int[] idNums = new int[100];
Naming Arrays Names start with lowercase letter and user uppercase letters to begin subsequent words. Often named using a plural noun and by adding a final word that implies a group
Subscript(Index) An integer contained within square brackets that specifies one of an array's elements. AN array's elements are numbered beginning with 0. Ex: salesFigures[0];
Out of Bounds When you use a subscript that is too small(negative) or too large for an array. An error message is generated
Initialization List A list of values separated by commas and enclosed within curly braces which initialize and array. The size of array is assigned based on the number of values. No keyword new needed. Ex: int[] tenMults = {10, 20, 30, 40, 50, 60};
Populating an Array Providing values for all the elements in an array
Initializing an Array You cannot directly initialize only part of an array. You either must initialize every element or none of them
length Field Contains the number of elements in the array. length is not an array method; it is a field. AN instance variable or object field such as length is also called a property of the object. Ex: scoreArray.length;
Enhanced for Loop(foreach loop) Allows you to cycle through an array without specifying the starting and ending points for the loop control variable. Ex: for(int val : scoreArray)... System.out.println(val);
Parallel Array One with the same number of elements as another and for which the values in corresponding elements are related
Range Match A process in which you compare a value to the endpoints of numerical ranges to find the category in which a value belongs
Passed by Value The individual array elements are passed by value; that is, ca copy of the value is made and used within the receiving method. When any primitive type(boolean, char, byte, short, int, long, float, or double) is passed to a method, the value is passed
Reference Types Arrays, like all nonprimitive objects, are reference types; this means that the object actually holds a memory address where the values are stored