@[email protected] to Programmer [email protected] • 2 years agoPersonally I prefer throw new nullpointerexceptionpawb.socialimagemessage-square30fedilinkarrow-up1408arrow-down18
arrow-up1400arrow-down1imagePersonally I prefer throw new nullpointerexceptionpawb.social@[email protected] to Programmer [email protected] • 2 years agomessage-square30fedilink
minus-square@[email protected]linkfedilink1•2 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
throw
throws a NPE if the parameter is null