Output

Variable Name     Value in Memory
fahrenheit
celsius
  1  import java.util.Scanner;
  2  
  3  public class FahrenheitToCelsius {
  4    public static void main(String[] args) {
  5      Scanner input = new Scanner(System.in);
  6  
  7      System.out.print("Enter a degree in Fahrenheit: ");
  8      double fahrenheit = input.nextDouble(); 
  9  
 10      // Convert Fahrenheit to Celsius
 11      double celsius = (5.0 / 9) * (fahrenheit - 32);
 12      System.out.println("Fahrenheit " + fahrenheit + " is " + 
 13        celsius + " in Celsius");  
 14    }
 15  }