Essaie ça :
public class JavaApplication14 {
public static void main(String[] args) {
activerRetraitDAB();
}
public static void activerRetraitDAB() {
Scanner scanner = new Scanner(System.in);
char touche;
do {
System.out.print("Appuyer sur la touche o pour activer le distributeur de billets: ");
touche = scanner.next().charAt(0);
} while (touche != 'o' && touche != 'O');
scanner.close();
}
}
Message édité le 02 novembre 2023 à 14:19:23 par Mebesir6