Review Questions
- What is RTTI and how does it work with downcasting?
- What is the purpose of a class object?
- What is the function of “Class.forName”?
- What is the use of a class literal?
- What is the use of “instanceof”?
- What are two uses of reflection?
- What is the difference between traditional reflection and RTTI?
- How is downcasting used in collections?
- What is the function of aliasing?
- Name five features of Java with regard to local copies.
- What is a shallow copy?
- What are two reasons for the “Cloneable” interface?
- What is the function of the “clone()” method of the root object?
- How does one manually make a deep copy of an object?
- Name a disadvantage of using serialization to make a deep clone.
- Name six ways to control cloning.
- Why does a copy constructor not work as anticipated in Java?
- What is the function of an immutable object?
- What is the disadvantage of using immutable objects?
- What is the advantage of making strings immutable?
- What is the function of the “StringBuffer” class?
- 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