J'ai un problème quand j'exécute ce programme, Si j'utilise int cela fonctionne, mais pour la chaîne ce n'est pas le cas.Java: faire pendant que le problème de chaîne
import java.util.Scanner;
public class userinput_swutch_do_while {
public static void main(String[] args) {
String password= null;
Scanner value = new Scanner(System.in);
do {
System.out.println("Enter the password for ATM: ");
password = value.nextLine();
System.out.println("You put : "+password);
} while (password !="55");
System.out.println("You got it!");
}
}
double possible de [? Comment puis-je comparer les chaînes en Java] (http://stackoverflow.com/questions/513832/how-do-i-compare -strings-in-java) –