My Code may look grammatically awful, but that's because I've had to censor out foul language.
I'm trying to get it to terminate when someone enters "bats", "Bats", or "BATS".
import java.util.*;
public class BATS
{
public static void main(String[] args)
{
Scanner BAT = new Scanner(System.in);
String Bat, BATS;
System.out.println("What is the most badass flying mammal ever?!");
Bat = BAT.nextLine();
Bat = Bat.toUpperCase();
while(Bat != "BATS")
{
System.out.println("No, its BATS!!!!!!!!!! Try again.");
Bat = BAT.nextLine();
Bat = Bat.toUpperCase();
if(Bat == "BATS")
{
System.out.println("YOU'RE RIGHT THEY ARE !!!!!");
break;
}
}
}
}