int
noun
say it: “int” /ɪnt/
Java's everyday type for whole numbers with no decimal point, from about minus two billion to plus two billion.
What is int in Java?
int — A primitive type for whole numbers within a fixed range.
class Order {
int itemCount = 3;
double price = 4.50;
char size = 'M';
boolean paid = true;
}
In a sentence
- “I used an int for the number of students, because you can't have half a student.”
Level: Novice · More Java terms at this level
Updated