concept wrapper class in category java

appears as: wrapper classes, wrapper class, wrapper class, wrapper classes, The wrapper classes, The wrapper classes, The wrapper class
OCA Java SE 8 Programmer I Certification Guide

This is an excerpt from Manning's book OCA Java SE 8 Programmer I Certification Guide.

Figure 2.18. Hierarchy of wrapper classes

You can create objects of the rest of the wrapper classes (Short, Integer, Long, and Float) in a similar manner. All the wrapper classes define constructors to create an object using a corresponding primitive value or as a String.

Another interesting point to note is that neither of these classes defines a default no-argument constructor. The wrapper classes are immutable. So it doesn’t make sense to initialize the wrapper objects with the default primitive values if they can’t be modified later.

Portlets in Action

This is an excerpt from Manning's book Portlets in Action.

4.6.2. Using wrapper classes

Like the servlet API, the Portlet 2.0 API introduced the concept of wrapper classes for portlet requests and responses. These wrapper classes hold references to the request or response object and implement all the methods of the request or response. The wrapper class is an example of a decorator pattern, where the decorating or wrapping class delegates all method calls to the wrapped request or response object.

sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest