Save
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


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.
Your email address is only used to allow you to reset your password. See 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.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
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

Java (Chapter 7/8)

1D/2D Arrays

QuestionAnswer
When is the memory allocated for an array. The memory is allocated when the array is created.
How do you access elements in an array? You access an array using its index. arrayRefVar[index] is known as an array indexed variable.
What is the representation of the third element in an array called a? a[2]
If you declare an array double [] list = {3.4, 2.0, 3.5, 5.5}; list[1] is __________. 2.0
If you declare an array double [] list = {3.4, 2.0, 3.5, 5.5}; the highest index in array list is ________. 3
How many elements are in array double [] list = new double [5]? 5
What is the correct term for numbers[99]? indexed variable
Assume int [] t = {1, 2, 3, 4}. What is t.length? 4
When you pass an array to a method, the method receives _________. the reference of the array
The JVM stores the array in an area of memory, called _______, which is used for dynamic memory allocation where blocks of memory are allocated and freed in an arbitrary order. heap
When you return an array from a method, the method returns __________. the reference of the array
The _________ method sorts the array scores of the double [] type. java.util.Arrays.sort(scores)
Assume int [] scores = {1, 20, 30, 40, 50}; what value does java.util.Arrays.binarySearch(scores, 30) return? 2
Assume int [] scores = {1, 20, 30, 40, 50}; what is the output of System.out.println(java.util.Arrays.toString(scores));? [1, 20, 30, 40, 50]
How can you get the word "abc" in the main method from the following call? [java Test "+" 3 "abc" 2] args[2]
Assume double [][] x = new double [4][5]; what are x.length and x[2].length? 4 and 5
What is the index variable for the element at the first row and first column in array a? a[0][0]
When you create an array using the following statement, the element values are automatically initialized to 0. "int [][] matrix = new int [5][5];" True
The ____________ method copies the sourceArray to the targetArray. System.arraycopy(sourceArray, 0, targetArray, 0, sourceArray.length);
Created by: Smurfette42
Popular Computers sets

 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards