Copyright

Basics of Programming 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. When looking at the integer group in the order of byte, short, integer, and long types, how is the relationship of each type's integer value defined?

Question 2 2. The primitive data type _____ would be most appropriate for reflecting characters in Unicode.

Question 3 3. The most frequently used type of Java primitive data is _____ while the least commonly used type is _____.

Question 4 4. What data type would be best suited for the value 500?

Question 5 5. Examine the following code. What is true about the method increaseSpeed()?

Page 2

Question 6 6. Examine the following class declaration? Is this valid?

Question 7 7. Polymorphism means _____

Question 8 8. Examine the following code. It can be said that the class Banana _____ attributes from the class Fruit

Question 9 9. What type of statement is the following?

Question 10 10. The compiler is giving an error on the following statement. Why?

Page 3

Question 11 11. Examine the following code. What is missing on the ''if statement''?

Question 12 12. Which of the following is a correctly written Java statement?

Question 13 13. What are these two symbols for: / and %.

Question 14 14. What will the value of l be?

Question 15 15. Examine the following code. The programmer is not getting the same value for myNumber and myNumber2. Why?

Page 4

Question 16 16. Examine the following code. What will the value of the variable tester be?

Question 17 17. Which of the following correctly creates a subclass, or child class, from the main Employee class?

Question 18 18. Examine the following code. Which variable CANNOT be used in the parent class of Benefit?

Question 19 19. Which phrase accurately describes the relationship between the subclass BlueChip and the parent Stock?

Question 20 20. The method of the parent class can be re-used and modified in a subclass inherited from the parent class. What is the term used to reference this behavior?

Page 5

Question 21 21. A Java String is a _____.

Question 22 22. Examine the following code. What will the value of the variable str1 be after it processes?

Question 23 23. A Java string is both an object and a _____

Question 24 24. A Java String is a sequence of _____.

Question 25 25. What does this method return?

Page 6

Question 26 26. Which is the parameter in the following method:

Question 27 27. How is the return value declared in a method?

Question 28 28. Which of the following is NOT true about a method in Java?

Question 29 29. Which of the following lists correctly identifies the two major categories of primitive data?

Question 30 30. Polymorphism supports _____, which is several methods with the same name but different arguments.

Basics of Programming 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!

FTCE Computer Science K-12 (005): Study Guide & Practice  /  Social Science Courses
Support