This question already has an answer here:
i want user to enter a int number. or a string by single input statement in java. and print message whether it is string or number. like this.
if(/*condition*/ )
System.out.println("is a integer");
else
System.out.println("is a string");
Aucun commentaire:
Enregistrer un commentaire