Returns Integer corresponding to s, or null if s is null. @throws NumberFormatException if s is nonnull and doesn't represent a valid integer.
(String s)
| 8 | * if s is nonnull and doesn't represent a valid integer. |
| 9 | */ |
| 10 | public static Integer parseInt(String s) { |
| 11 | return (s == null) ? (Integer) null : Integer.parseInt(s); |
| 12 | } |
| 13 | |
| 14 | public static void main(String[] args) { |
| 15 | System.out.println(parseInt("-1") + " " + parseInt(null) + " " + parseInt("1")); |
no outgoing calls
no test coverage detected