Everytime I run this I say yes and it pops up with both answers "Good" & "Too Bad" i'm making a Hitler Tycoon but I tried if statements and do-while statements but nothing seems to be working
String decision;
String name;
System.out.printf(name = "Would you like to slay more jews than you could ever imagine!? (Yes or No?)\n");
BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));
try {
decision = bufferRead.readLine();
String yes = "Good";
String no = "Too Bad";
{
if (descision.equalsIgnoreCase(yes)); {
System.out.println(yes);
if (descision.equalsIgnoreCase(no));
System.out.println(no);
}}
} catch (IOException e) {
e.printStackTrace();
}
Aucun commentaire:
Enregistrer un commentaire