In Java, we use numerical data types to represent numbers. Specifically, in this lesson, we're focusing on int
and float
. The int
data type is used to represent whole integer numbers, and the float
data type is used to represent decimal numbers - numbers with a decimal point.
The largest value an int
can store is 2147483647
, which is , and the smallest is -2147483648
, which is . Here's an example of using the number:
