Watch this video on YouTube
Fast guide to parse Java String to int and long using parseInt parseLong valueOf and safe parsing tips for real world code