Transformer une string en un int ou un float?

chtieu62 Messages postés 5 Date d'inscription mardi 20 avril 2004 Statut Membre Dernière intervention 11 mai 2004 - 11 mai 2004 à 18:32
chtieu62 Messages postés 5 Date d'inscription mardi 20 avril 2004 Statut Membre Dernière intervention 11 mai 2004 - 11 mai 2004 à 19:02
Comment peut on faire pour changer une chaine de caractere en entier ou flottant?
Est ce possible?
Quelles méthodes?
Quels imports?
Merci

2 réponses

kaloway Messages postés 358 Date d'inscription jeudi 24 octobre 2002 Statut Membre Dernière intervention 13 avril 2020
11 mai 2004 à 18:55
kaloway

pour un entier Integer.parseInt(monString)
pouur un flottant Float.parseFloat(monString)
0
chtieu62 Messages postés 5 Date d'inscription mardi 20 avril 2004 Statut Membre Dernière intervention 11 mai 2004
11 mai 2004 à 19:02
Merci, je vais tester cela de suite!
0
Rejoignez-nous