java - Entering int in a string variable -


i ask user enter name(string) , age(int), if user enters number in name space "crashes". can stop program crashing. im using java.

are casting input int, or leaving string? once take in input need convert string int. int age = integer.parseint(ageinput);


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

excel - I can't get the attachement of the email PHP -

node.js - Express and Redis - If session exists for this user, don't allow access -