alphacyberranger to Programmer [email protected]English • 1 year agoJavalemmy.worldmessage-square77fedilinkarrow-up1583
arrow-up1535imageJavalemmy.worldalphacyberranger to Programmer [email protected]English • 1 year agomessage-square77fedilink
minus-squarelarvydelinkfedilink15•1 year agoint coerces to double automatically, without explicit casting
minus-square@[email protected]linkfedilink18•1 year 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•1 year 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