When I debug this code I noticed that the If statement does not ever switch the boolean type sales variable to true... This is bugging me because I know that answer = "y" when it gets to the If statement. Help please! and yes I did import java.util.Scanner
Scanner input = new Scanner(System.in);
boolean sales = false;
String answer;
System.out.print("Will you be calculating the Sales department pay aswell? (y or n):");
answer = input.nextLine().trim();
if (answer == "y")
{
sales = true;
}
i have