mercredi 20 juillet 2016

using an if statement to get user input and set an int value [duplicate]

This question already has an answer here:

if(userInput.hasNextLine()){
     this.setAge(userInput.nextLine());

I want the user to input the Age but it is an int not a string the other 2 parts coded have been string outputs and have been fine, Using Eclipse and haven't coded in about 4 years.

Aucun commentaire:

Enregistrer un commentaire