Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Try adding an integer, a floating point and a double-precision number. What will you get? Still reporting an error?
Try adding an integer, a floating point and a double-precision number. What will you get? Still reporting an error?
Integer and floating point both become double, and the result is also double.

int a = 1;

Floating point b = 2;;

Double c = 2.3

Double d = 0;;

d = a+b+c;

system . out . print(d);

//The result is 5.3.