Bonjours, j'utilise le code suivant pour tramsformer un string en Int:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
String num1Str = JOptionPane.showInputDialog("Entrez un chiffre ou un nombre:");
var1 = Integer.parseInt(num1Str);
Mais voila.. j'aimerais pouvoir transformer la string en Double et non en Int.. quelqu'un sait comment faire?

Merci