Created
February 15, 2021 12:40
-
-
Save zwazel/579c32eff7e1943b8850cfd44794382e to your computer and use it in GitHub Desktop.
Live Templates for IntelliJ
This file contains 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
public Integer getIntFromString(String s) { | |
try { | |
return Integer.parseInt(s); | |
} catch (NumberFormatException e) { | |
System.out.println("Error! Can't convert String to int!"); | |
return null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment