I have been trying to get user input and based on what they put turn it into a result, every time that i change it. else statement doesn't work, can anybody tell me what i'm doing wrong?
String heads = "Heads";
String tails = "Tails";
System.out.println("Please choose (H)eads or (T)ails:");
Scanner in = new Scanner(System.in);
String inputs = in.nextLine();
String H = "H";
String T = "T";
if(inputs == H) {
String choice = "0";
}else if(inputs == T) {
String choice ="1";
}else {
System.out.println("Please try again");
}