Long.parseLong("1000L") throws a NumberFormatException - it takes string values, not necessarily Java literals (although there is a lot of overlap).
Because of this, Long.parseLongcovers are Integer.parseIntcompletely the same as values intare the correct subset of values long.
Happy coding.
user166390
source
share