import javax.swing.JOptionPane; public class Select1 { public static void main(String[] args) { String input1 = JOptionPane.showInputDialog("Input a real number!"); double x = Double.parseDouble(input1); String input2 = JOptionPane.showInputDialog("Input another one!"); double y = Double.parseDouble(input2); double z = x>=y?x:y; System.out.println(z + " is the larger one!"); } }