Please enable JavaScript to use CodeHS

AP Computer Science A (Cortado)

Lesson 4.7 Wrapper Classes

Description

In this lesson, students will explore wrapper classes (Integer, Double), their utility methods, and their advantages in handling null values and string-to-number conversions. Through real-world applications like gym workouts, zoo data, restaurant orders, and NBA player stats, students will build a deeper understanding of autoboxing, unboxing, and data processing with wrapper types.


Objective

Students will be able to:

  • Explain the difference between primitive types and their wrapper class equivalents
  • Use wrapper class methods like parseInt() and parseDouble() to convert between data types
  • Implement and analyze autoboxing and unboxing in Java
  • Apply wrapper classes to handle nullable values and real-world datasets with missing data