Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What happens if you try to add an integer, a floating point and a double precision? Still reporting an error?
What happens if you try to add an integer, a floating point and a double precision? 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.