A voir également:
- Only chiffre dans un texfield en java
- Jeux java itel - Télécharger - Jeux vidéo
- Waptrick java football - Télécharger - Jeux vidéo
- Clavier iphone chiffre et lettre - Guide
- Excel trier par ordre croissant chiffre - Guide
- Telecharger macro convertir chiffre en lettre excel - Télécharger - Tableur
1 réponse
salut
tu dois tester le String avec
dans la gestion de l'erreur, il suffit de signaler à l'utilisateur qu'il doit recommencer correctement l'opération
tu dois tester le String avec
public static Integer valueOf(String s) throws NumberFormatExceptionReturns an Integer object holding the value of the specified String. The argument is interpreted as representing a signed decimal integer, exactly as if the argument were given to the parseInt(java.lang.String) method. The result is an Integer object that represents the integer value specified by the string. In other words, this method returns an Integer object equal to the value of: new Integer(Integer.parseInt(s)) Parameters: s - the string to be parsed. Returns: an Integer object holding the value represented by the string argument. Throws: NumberFormatException - if the string cannot be parsed as an integer.
dans la gestion de l'erreur, il suffit de signaler à l'utilisateur qu'il doit recommencer correctement l'opération