image
What Are Wrapper Classes?
What Are Wrapper Classes?
Difficulty
Beginner
Duration
10m
Students
96
Ratings
4.7/5
Description

In this course, we will learn about wrapper classes, auto-boxing, and unboxing concepts.

Learning Objectives

  • What is Wrapper Class?
  • Conversion of Types
  • Autoboxing - Unboxing

Intended Audience

  • Anyone looking to get Oracle Java Certification
  • Those who want to learn the Java Programming language from scratch
  • Java developers who want to increase their knowledge
  • Beginners with no previous coding experience in Java programming
  • Those who want to learn tips and tricks in Oracle Certified Associate – Java SE 8 Programmer certification exams

Prerequisites

  • No prior knowledge is required about the Java programming language
  • Basic computer knowledge
Transcript

Hi there. In this video, we will learn about the Wrapper Classes. So, what is the Wrapper Class in Java?

The Wrapper Classes are used for converting primitive data types into objects, like byte into Byte, int into Integer, char into Character, etc. As you know, the primitive data types such as int, char, etc, are not objects, they do not belong to any class. They are defined in the language itself. Sometimes, it is required to convert data types into Wrapper objects in Java language. The primary benefit of this process is that the Wrapper class of a particular primitive type can hold a lot of information and it provides useful functions, such as conversion from one type to another and all other suitable functionalities. 

You can see Wrapper Classes of primitive types on the table. The Wrapper Classes are defined in the java.lang package. Another important point in using Wrapper Classes is this, collections in Java, such as ArrayList, which we will learn later, can only store objects, not primitive data types. That's why we need Wrapper Classes when working with collections. You'll understand this better in the collection section. I think we understood what Wrapper Classes are. Let's take a short break here. In the next lesson, we'll look at the conversion between primitives and wrappers. See you in the next lesson.

 

About the Author
Students
3948
Courses
64
Learning Paths
5

OAK Academy is made up of tech experts who have been in the sector for years and years and are deeply rooted in the tech world. They specialize in critical areas like cybersecurity, coding, IT, game development, app monetization, and mobile development.

Covered Topics