The program shuts down right after I receive input for a String and an int variable, and I'm really confused as to why it's doing this. Any help at all would be greatly appreciated.
import java.util.Scanner; class Tempurature{ public static void main(String args[]) { Scanner in = new Scanner(System.in); int tempNum; String tempScale; System.out.print("Type F for Fahrenheit or C for Celsius: "); tempScale = in.nextLine(); System.out.print("Enter the tempurature: "); tempNum = in.nextInt(); if (tempScale == "C" && tempNum >= 100) System.out.println("Your water is boiling."); if (tempScale == "F" && tempNum >= 212) System.out.println("Your water is boiling."); if (tempScale == "F" && tempNum >= 212) System.out.println("Your water is liquid."); else if (tempScale == "C" && tempNum <= 100) System.out.println("Your water is liquid."); } }