alphacyberranger to Programmer [email protected]English • 2 years agoJavaimagemessage-square75arrow-up1582arrow-down145
arrow-up1537arrow-down1imageJavaalphacyberranger to Programmer [email protected]English • 2 years agomessage-square75
minus-squarelarvydelinkfedilink15•2 years agoint coerces to double automatically, without explicit casting
minus-square@[email protected]linkfedilink17•2 years agoThe CPU has to do real work to convert between float and int types. Returning an int type would just be giving the CPU extra work to do for no reason
minus-squareNotNotMikelinkfedilink3•2 years agoI’m learning so much from this thread and I don’t even use Java
int
coerces todouble
automatically, without explicit castingThe CPU has to do real work to convert between float and int types. Returning an int type would just be giving the CPU extra work to do for no reason
I’m learning so much from this thread and I don’t even use Java