Sign In | Subscribe
Start learning today, and be successful in your academic & professional career. Start Today!
Loading video...
This is a quick preview of the lesson. For full access, please Log In or Sign up.
For more information, please see full course syllabus of Introduction to Java
  • Discussion

  • Study Guides

  • Download Lecture Slides

  • Table of Contents

  • Related Services

Bookmark and Share

Start Learning Now

Our free lessons will get you started (Adobe Flash® required).
Get immediate access to our entire library.

Sign up for

Membership Overview

  • Unlimited access to our entire library of courses.
  • Search and jump to exactly what you want to learn.
  • *Ask questions and get answers from the community and our teachers!
  • Practice questions with step-by-step solutions.
  • Download lesson files for programming and software training practice.
  • Track your course viewing progress.
  • Download lecture slides for taking notes.
  • Learn at your own pace... anytime, anywhere!

Numeric Wrapper Classes & Mathematical Functions

  • A list can only store objects of a class, not primitive types
  • There is a numeric wrapper class for each primitive type: Integer for int; Double for double; Boolean for boolean (Boolean is not in the AP subset)
  • Wrapper class provides a constructor to create an object with a specified value
  • Wrapper class provides an accessor method to convert back to primitive type
  • Wrapper class provides equals and compareTo methods for comparing values
  • Math class provides useful methods like absolute value, square root, and random number generation

Numeric Wrapper Classes & Mathematical Functions

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

  • Intro 0:00
  • Roadmap 0:11
  • Numeric Wrapper Classes 0:42
    • To Get Around Storing Limitation
  • Setting and Getting Values 2:30
    • Double Class
  • Comparing Values 5:07
    • Equals Method
  • Comparing Values 7:16
    • CompareTo Method: Integer Class
    • CompareTo Method: Double Class
  • Minimum and Maximum Values 10:28
    • Integer Class: Publib Static Final
    • Double Class
  • Automatic Conversion 12:53
    • Autoboxing
    • Example
    • Get Method
  • The Math Class 15:59
    • Math.E
    • Math.PI
    • Example
  • The Math Class 17:07
  • Working With Random Numbers 18:42
    • Example
  • Summary 22:14