so yeah i got this problem. i have to do a program and the first part of it is user input.
i have 5 choices. 4 are an int and one is a char.
heres the code i got so far.
oh and btw the keyboard class is a class my teach gave me for my class cause we are complete beginnersint reponse; System.out.println("1-Plus longue repetition de nucleotide"); System.out.println("2-Liste des sous-sequences communes"); System.out.println("3-Plus longue sous-sequence communes"); System.out.println("4-Alignement optimal"); System.out.println("q-Quitter"); reponse = Keyboard.readInt(); System.out.println(reponse); if (reponse == 1) { } if (reponse == 2) { } if (reponse == 3) { } if (reponse == 4) { }its basically used for user input.
so as you can see i did an if for all the int reponse but what about if the user enters q? how do i check it?
sorry if its in french but the code is still in english right.
looking forward to your help
Blackbird94


LinkBack URL
About LinkBacks
its basically used for user input.
Reply With Quote