Java Programming Terminology 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. Examine the following Java code. It accesses a variable from another class. Which of the following correctly declares this variable so that the code below will compile?

Question 2 2. _____ is a Reference Object data type which stores multiple values using the same variable.

Question 3 3. Which of the following is NOT a method for rounding in Java?

Question 4 4. Which of the following is NOT a characteristic of all Java Variables?

Question 5 5. Which of the following correctly converts the int variable q to a string?

Page 2

Question 6 6. Your code divides two integers: x = 55; y = 8. Which of the following will generate the real value (6.875)?

Question 7 7. Which of the following must to be used inside of an if-statement?

Question 8 8. Which of the following is a restriction to the Java static block?

Question 9 9. Which of the following is a good use for a static block?

Question 10 10. A/An _____ represents a set of _____.

Page 3

Question 11 11. Which company currently owns Java?

Question 12 12. Which of the following casts the variable g to an integer value?

Question 13 13. Which of the following is a characteristic of Java?

Question 14 14. Which of the following would be a good reason to make use of varargs?

Question 15 15. What is the real difference between a property and a field?

Page 4

Question 16 16. Examine the following code. Which of the following statements converts the variable m to integer from hexadecimal?

Question 17 17. Examine the following code. The literal value for variable m1 is stored in the _____, and m2 is stored in _____

Question 18 18. Based on the code below, which of the following correctly creates an instance of the static nested class?

Question 19 19. What will Java display if the value of the wage variable is 10.77823?

Question 20 20. Which of the following is NOT a reason that Java is often used in devices?

Page 5

Question 21 21. Which of the following creates a method that returns no value?

Question 22 22. Which of the following creates a constant that cannot be changed, but may be referenced by other classes in Java?

Question 23 23. Which data type would you use to declare whether a student attended class?

Question 24 24. Rounding is the process we use to control the _____ of a value.

Question 25 25. Which of the following is NOT an original target for Java?

Page 6

Question 26 26. Examine the following code. What will happen if the user enters text instead of an integer?

Question 27 27. Examine the following code. What is the value of z?

Question 28 28. Which of the following correctly defines the if-statement?

Question 29 29. Which of the following is an example of an exception?

Question 30 30. What is true about the following code?

Java Programming Terminology 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