I am having a problem with some code I wrote for a rock paper scissors game. In my main method I have another method that decides the winner and it isn't performing that method. It's acting as if it isn't even there. Sorry if there is an obvious answer I am just a beginner. For example if it is a tie it won't perform the tie method inside of the decideWinner() method. Thanks for any help
import java.util.Scanner;
import java.util.Random;
public class appels {
public static Scanner Andrew = new Scanner(System.in);
public static Random Hello = new Random();
public static double compAnswer;
public static String compChoice;
public static String answer;
public static void main(String [] args){
getAnswer(answer);
showCompAnswer();
decideWinner();
}
public static void getAnswer(String answer){
System.out.println("Welcome to Rock, Paper, Scissors Vs. the computer.\nWhich do you choose:");
answer = Andrew.nextLine();
}
public static void showCompAnswer(){
compAnswer = Hello.nextDouble();
//System.out.println(compAnswer);
if(compAnswer > .66){
compChoice = "rock";
}else if(compAnswer>.33 & compAnswer<.66){
compChoice = "paper";
}else{
compChoice = "scissors";
}
System.out.println(compChoice);
}
public static void decideWinner(){
if(compChoice == answer){
tie();
System.out.println("Hi");
}
}
public static void tie(){
System.out.println("It's a tie.");
}
public static void compWin(){
System.out.println("The computer wins. :(");
}
public static void userWin(){
System.out.println("You win!");
}
}