1
Wrappers and Adapters
•A wrapper
class stores an entity and adds operations that the original type did not
support correctly. Java has wrapper types for the 8 primitive types (e.g., Integer for int)
•An adapter class is used when the interface
of an existing class needs to be changed to a more appropriate one (e.g., InputStreamReader and OutputStreamWriter that convert byte-oriented
streams to character-oriented streams).