nave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish · 11 months agoI wishi.imgur.comimagemessage-square155fedilinkarrow-up1804arrow-down114
arrow-up1790arrow-down1imageI wishi.imgur.comnave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish · 11 months agomessage-square155fedilink
minus-squareBrightHalo@lemmy.worldlinkfedilinkarrow-up12arrow-down7·edit-211 months agoIf only you could do something like… def IsEven(number): return number % 2 == 0
minus-squaretakeda@lemmy.worldlinkfedilinkarrow-up10·11 months agoCan’t do that, we are taking about Java.
minus-squareBrightHalo@lemmy.worldlinkfedilinkarrow-up4arrow-down1·11 months agoYou’re telling me Java doesn’t support the modulo operator?
minus-squareMrduckrocks@lemmy.worldlinkfedilinkarrow-up1·11 months agoJava does have the modulo/remainder support, just like python.
If only you could do something like…
def IsEven(number): return number % 2 == 0
Can’t do that, we are taking about Java.
You’re telling me Java doesn’t support the modulo operator?
Java does have the modulo/remainder support, just like python.