what is the difference between long and double in java?
The main difference between long and double in Java is that long is a data type that stores 64 bit two's complement integer while double is a data type that stores double prevision 64 bit IEEE 754 floating point. In brief, long is an integral type whereas double is a floating point type.