Copyright
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.

Advanced Data Types in Java 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. What keyword is used when creating a class that uses an interface?

Question 2 2. Which Java language construct is commonly used to create abstract data types?

Question 3 3. What does it mean for a data type to be abstract?

Question 4 4. What could you change to make the following code not result in a error?

Question 5 5. The output from his Java program is _____.

Page 2

Question 6 6. In the rare case when one must make a separate copy of an object referred to by a reference variable, the class _____ method should be used.

Question 7 7. The new operator allocates memory to hold an array or class object's data and the _____ is called to initialize the data to valid values.

Question 8 8. Java variables can represent two types of data: _____ and _____.

Question 9 9. Which of the following is an abstract data type?

Question 10 10. Which of the following code examples best describes an abstract data type?

Page 3

Question 11 11. The shaded area in the middle of the following diagram can be called what?

Question 12 12. An additional term for an abstract data type is a(n) _____

Question 13 13. Which of the following correctly creates and initializes a non-primitive or reference data type for the Inventory class?

Question 14 14. What type of non-primitive variable is the following?

Question 15 15. Examine the following code. Which type(s) of reference or non-primitive variable is wax?

Page 4

Question 16 16. The following code prints out the value of an array (assume that all values have been updated). What will the system display?

Question 17 17. Examine the following code. What is the value of the Month of the Date?

Question 18 18. The Date in Java is not only a data type but a _____.

Question 19 19. Which method will convert a Java Date to a String?

Question 20 20. Examine the following code. What value will todayM have?

Page 5

Question 21 21. An unsigned _____ stores only positive integer values

Question 22 22. If a negative number does get into the unsigned data type variable, what can happen?

Question 23 23. The char data type consists of _____ byte(s)

Question 24 24. One benefit to unsigned data types (especially integers) is:

Question 25 25. An enumerated (enum) type in Java is useful for:

Page 6

Question 26 26. Which code sample below will correctly display the values of the following enum:

Question 27 27. In Java, an enum is a _____ data type.

Question 28 28. In the following code at the Caffeine enum, what will happen if you compile the code?

Question 29 29. Which is true about an interface definition?

Question 30 30. Java doesn't allow primitive data type variables to be assigned to/from reference type variables because _____.

Advanced Data Types in Java 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