Wrapper Classes - Integer and Double

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Class constant

A named value that cannot be changed and can be accessed anywhere in the class

Autoboxing

Automatic conversion between reference and primitive types.

Wrapper class

Classes in java.lang that provide constants and methods for working with primitive types.

Unboxing

Convert an object to a value type

Double wrapper class

The Double class wraps a value of the primitive type double in an object. An object of type Double contains a single field whose type is double.

Integer wrapper class

The Integer class wraps a value of the primitive type int in an object. An object of type Integer contains a single field whose type is int.

Underflow

The result of a calculation is too small to be represented using the available number of bits.

Integer.MAX_VALUE

a constant • holds the largest value for the int data type • 2^31 -1

Integer.MIN_VALUE

a constant • holds the smallest value for the int data type • -2^31

Overflow

error that results when the number of bits is not enough to hold the number, like a car's odometer "rolling over"

intValue()

returns the value of this integer as an int


Kaugnay na mga set ng pag-aaral

Pharmacological and Parenteral Therapies

View Set

Language of Medicine - Ch. 19: Cancer Medicine

View Set

Inquisitive Chapter 5: Civil Rights

View Set

Chapter 13 The spinal cord, spinal nerves, and somatic reflexes

View Set

Les Questions de "Le Secret de Maître Cornille"

View Set