Hacker News new | ask | show | jobs
by wvenable 1750 days ago
Java needs a TryParseInt (sorta like C# has) so can you use either one as appropriate.

There are actually two main use cases for integer parsing: one where the value is expected to be an integer (you're parsing a file format) and the other where it's just likely not to be an integer (getting input from the user).