What is the difference between int and double in java

9/14/2017 6:40:05 AM


6 Answers

New Answer


Int is integers, no decimal behind Double has decimal behind


addition to @ vengat Int is whole numbers while double is floating point numbers


int 12 double 1.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.




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.