In this chapter, you will learn:
About the wrapper classes in Java and how to use them
How to get primitive values from strings
How primitive values are automatically boxed into wrapper objects when needed
How wrapper objects are automatically unboxed into primitive values when needed
All classes in this chapter are a member of a jdojo.wrapper module, as declared in Listing 12-1.
Listing 12-1. The Declaration of a jdojo.wrapper Module
// module-info.java
module jdojo.wrapper {
exports com.jdojo.wrapper;
}
Wrapper Classes
In previous chapters, you learned that primitive and reference ...