Skip To Content

Athabasca University

Review Questions

  1. What is RTTI and how does it work with downcasting?
  2. What is the purpose of a class object?
  3. What is the function of “Class.forName”?
  4. What is the use of a class literal?
  5. What is the use of “instanceof”?
  6. What are two uses of reflection?
  7. What is the difference between traditional reflection and RTTI?
  8. How is downcasting used in collections?
  9. What is the function of aliasing?
  10. Name five features of Java with regard to local copies.
  11. What is a shallow copy?
  12. What are two reasons for the “Cloneable” interface?
  13. What is the function of the “clone()” method of the root object?
  14. How does one manually make a deep copy of an object?
  15. Name a disadvantage of using serialization to make a deep clone.
  16. Name six ways to control cloning.
  17. Why does a copy constructor not work as anticipated in Java?
  18. What is the function of an immutable object?
  19. What is the disadvantage of using immutable objects?
  20. What is the advantage of making strings immutable?
  21. What is the function of the “StringBuffer” class?
  22. Explain why it is possible for two (or more) threads to enter a synchronized method (or methods) when one (or more) threads is waiting for a condition.

Updated July 30 2020 by FST Course Production Staff