Java Programming Tutorial & Training  /  Business Courses

Test Prep Plan - Take a practice test

Take this practice test to check your existing knowledge of the course material. We'll review your answers and create a Test Prep Plan for you based on your results.
How Test Prep Plans work
1
Answer 50 questions
Test your existing knowledge.
2
View your test results
Based on your results, we'll create a customized Test Prep Plan just for you!
3
Study smarter
Study more effectively: skip concepts you already know and focus on what you still need to learn.

Java Arrays Chapter Exam

Exam Instructions:

Choose your answers to the questions and click 'Next' to see the next set of questions. You can skip questions if you would like and come back to them later with the yellow "Go To First Skipped Question" button. When you have completed the practice exam, a green submit button will appear. Click it to see your results. Good luck!

Page 1

Question 1 1. The following code declares a character array with 3 rows and 5 columns:

Question 2 2. Which of these code samples correctly processes a 2-dimensional array?

Question 3 3. The following code correctly references the fourth row, fifth column, and seventh plane in a 3D array named matrix:

Question 4 4. Examine the following Java code. What is the name of the string variable being converted to an array of bytes?

Question 5 5. When a string is converted to a byte array in Java, the numbers in each bucket of the array are _____ values.

Page 2

Question 6 6. What is the correct syntax for importing the Java utility for array processing?

Question 7 7. How many dimensions does the following array have?

Question 8 8. A Java array that would have rows and columns is called a _____ array?

Question 9 9. What type of an array is this?

Question 10 10. Which of the following correctly creates a new ArrayList for orders?

Page 3

Question 11 11. ArrayList has the _____ keyword to display the length/size of the array:

Question 12 12. What is the native Java function that allows the copying of one array to another?

Question 13 13. In order to use the Map class, what statement is needed in your code?

Question 14 14. Which of the following correctly adds an entry to the publishers map

Question 15 15. Which of the following correctly retrieves the value for the key DWTS in the realityShow map?

Page 4

Question 16 16. Examine the following code for an array. Which of the following statements will initialize it?

Question 17 17. Examine the following code. What is the value of the fifth bucket in the conversion variable (conversion[5])?

Question 18 18. Examine the following code. What will happen when the code runs?

Question 19 19. In the following code, how many times will the for loop process?

Question 20 20. Examine the following code. Which of the following statements will retrieve the perfect score (300)?

Page 5

Question 21 21. What function/keyword will display the size of an array?

Question 22 22. The number of elements in the Java array named 'ages' can be determined via _____.

Question 23 23. Once the number of elements of a Java array has been specified _____.

Question 24 24. Java arrays _____ the ArrayList container class.

Question 25 25. Although we use the term multidimensional arrays, a multidimensional array is really an array of _____

Page 6

Question 26 26. What is the name of the method being used to display a readable version of the byte array coolArray in this Java code?

Question 27 27. Which of the following is the correct way to declare and fill an int array?

Question 28 28. Examine the following code. Which bucket is the Vegetarian option being added to for the array called plates?

Question 29 29. What is the purpose of the function used below?

Question 30 30. What is the size of the array orderID?

Java Arrays Chapter Exam Instructions

Choose your answers to the questions and click 'Next' to see the next set of questions. You can skip questions if you would like and come back to them later with the yellow "Go To First Skipped Question" button. When you have completed the practice exam, a green submit button will appear. Click it to see your results. Good luck!

Support