GandhiTheDerg ( GandhiTheDerg@pawb.social ) to Programmer Humor@lemmy.ml · 3 years agoPersonally I prefer throw new nullpointerexceptionpawb.socialimagemessage-square44linkfedilinkarrow-up1321
arrow-up1321imagePersonally I prefer throw new nullpointerexceptionpawb.socialGandhiTheDerg ( GandhiTheDerg@pawb.social ) to Programmer Humor@lemmy.ml · 3 years agomessage-square44linkfedilink
minus-squaresilenium_dev ( silenium_dev@etaorion.org ) linkfedilinkarrow-up1·3 years agoFun fact: there’s a shorter way to throw a NullPointerException: throw null; Because throw throws a NPE if the parameter is null
Fun fact: there’s a shorter way to throw a NullPointerException:
throw null;Because
throwthrows a NPE if the parameter is null