Returning null as an int permitted with ternary operator but not if statement Returning null as an int permitted with ternary operator but not if statement java java