Sorry guys I just have a quick question. I am trying to figure out why program won't print out "Your item is a moose" when the user enters animal at the first prompt and then puts yes at the second prompt. Any help would be great thanks
public static void main(String[] args) {
// TODO Auto-generated method stub
String Answer1;
String Answer2;
// Read in how much cash the user has
Answer1 = JOptionPane.showInputDialog("Question 1: Is it an animal, vegetable, or mineral");
Answer2 = JOptionPane.showInputDialog("Question 2: Is it bigger than a breadbox");
if (Answer1 == "animal" && Answer2 == "yes") {
JOptionPane.showMessageDialog(null, "Your item is: A Moose");
}
}
}