import javax.swing.*;public class Conversions { public static void main(String args[]) { String temp1, input; double result; temp1 = JOptionPane.showInputDialog(null, "Input either \"meter\" or \"feet\""); if(temp1=="feet") { input = JOptionPane.showInputDialog(null, "How many feet would you like to convert to meters?"); result = Double.parseDouble(input) * 3.305; JOptionPane.showMessageDialog(null, "When converting " +input + "feet, you have " +result + " meters"); } if(temp1=="meter") { input = JOptionPane.showInputDialog(null, "How many meters would you like to convert to feet?"); result = Double.parseDouble(input) * 3.305; JOptionPane.showMessageDialog(null, "When converting " +input + "meters, you have " +result + " feet"); } System.exit(0); }}