Skip to Main Content
Beginning Java 8 Fundamentals: Language Syntax, Arrays, Data Types, Objects, and Regular Expressions
book

Beginning Java 8 Fundamentals: Language Syntax, Arrays, Data Types, Objects, and Regular Expressions

by Kishori Sharan
June 2014
Beginner content levelBeginner
810 pages
23h 28m
English
Apress
Content preview from Beginning Java 8 Fundamentals: Language Syntax, Arrays, Data Types, Objects, and Regular Expressions

CHAPTER 8

image

Wrapper Classes

In this chapter, you will learn:

  • About the wrapper classes and how to use them
  • How primitive values are automatically boxed into wrapper objects when needed
  • How wrapper objects are automatically unboxed into primitive values when needed

Wrapper Classes

In previous chapters, you learned that primitive and reference types are not assignment compatible. You cannot even compare a primitive value with an object reference. Some parts of the Java library work only with objects; for example, collections in Java work only with objects. You cannot create a list of primitive values, such as 1, 3, 8, and 10. You will need to wrap ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Java 9 Fundamentals: Arrays, Objects, Modules, JShell, and Regular Expressions

Beginning Java 9 Fundamentals: Arrays, Objects, Modules, JShell, and Regular Expressions

Kishori Sharan

Publisher Resources

ISBN: 9781430266532Purchase book