Please enable JavaScript to use CodeHS

Chapter 1

Primitive Types

1.6 Casting and Range of Variables

How Casting Works

Casting an Integer to a Double

Casting a Double to an Integer

Rounding Using Casting

Division with Casting

Numerical Ranges

Casting

Casting Order of Operations

Implicit Casting

Min and Max Values of Integers

Check Your Understanding

  1. Incorrect Correct No Answer was selected Invalid Answer

Exercise: Movie Ratings