+ 4
What is the difference between int and double in java
6 Answers
+ 9
Int is integers, no decimal behind
Double has decimal behind
+ 6
addition to @ vengat Int is whole numbers while double is floating point numbers
+ 2
int 12
double 1.2
+ 2
int as we know is an integer. Integers are a set discrete numbers ranging from negative values to positive, meaning they cant contain decimal places where as double represents a set of continuous numbers, also ranging from positive to negative but this time with decimals. For example; 5 is an int and 5.2 is a double value.
+ 1
thx
0
int is a 32 bit data type which can be used to store integer.
double is 64 bit data type used to store floating point numbers that is numbers which has something after decimal point.