Copyright

Java Programming Overview 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. Based on naming conventions, the object 'Publication' is a _____, and 'book' is a _____

Question 2 2. In the following code, the variable is all-caps. Why?

Question 3 3. In the following code, Publication is a class, and publication is a constructor. What should be changed (if anything) to align with naming conventions?

Question 4 4. How could the following code be changed to keep with naming conventions?

Question 5 5. In the following code, are the two objects (publication and Publication) the same?

Page 2

Question 6 6. Which of the following code snippets reduces the scope of local variables?

Question 7 7. Examine the following code. Why won't it compile?

Question 8 8. Examine the following code. Which of the following is a local variable?

Question 9 9. How can we further reduce the scope of local variables?

Question 10 10. You have created a complex program with several methods. Inside each method are local variables. Under what circumstance would you create several local variables, each with the same name/data type?

Page 3

Question 11 11. If all elements of an array are of the same type, the array is said to be _____.

Question 12 12. Which of the following is a characteristic of a Java array?

Question 13 13. What is the number of elements in a Java array called?

Question 14 14. In Java, length is associated with _____, and size is associated with _____.

Question 15 15. Which of the following declarations is correct for a Java array of three elements?

Page 4

Question 16 16. What is an example of object-oriented programming?

Question 17 17. A brand has to do with the _____ of a company.

Question 18 18. What is an advantage of a cross-platform program?

Question 19 19. A Java Plug-in is a kind of _____?

Question 20 20. A logo is a _____?

Page 5

Question 21 21. The keyword this in Java represents the current _____ you are executing within.

Question 22 22. Which of the following operators is used with the keyword this?

Question 23 23. The Java keyword this provides access to _____ variables.

Question 24 24. If a class variable called value, and a parameter variable called value both exist, then access to the local variable within a method would be accomplished using?

Question 25 25. If a class variable called value, and a local variable called value both exist, then access to the class variable within a method would be accomplished using?

Page 6

Question 26 26. What is of the following are similarities between the Integer object and the String object in Java?

Question 27 27. What of the following is a difference between the Integer object and the String object in Java?

Question 28 28. Which of the following is correct code for the length() method?

Question 29 29. What does the Integer class in Java represent?

Question 30 30. Which of the following statements is correct with respect to the replace method?

Java Programming Overview 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!

Information Systems: Help and Review  /  Business Courses
Support