Created
April 17, 2021 16:43
-
-
Save zivce/6038a59336ae120fa2c6d61645ed6966 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private int readExpirationAsInt(Milk milk) | |
{ | |
String expiration = milk.getExpiration(); | |
try { | |
return Integer.parseInt(expiration); | |
} | |
catch(NumberFormatException ignored) {} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment