Skip to content

Glossary: Java Basics

Cast

Also written: casting, (int), (double)

Converting a value to another type by writing the new type in parentheses in front, such as `(double) bags / cafes`. Casting a decimal to `int` drops the decimals without rounding.

Where the book teaches it

Related terms

Integer divisiondoubleint