首页 > 代码库 > inch和meter之间的转换问题

inch和meter之间的转换问题

import javax.swing.JOptionPane;public class inchToMeter {    public static void main(String[] args){        final double PARAMETER = 0.305;        String input = JOptionPane.showInputDialog(null,"plz input inchs:",                "input dialog Demo",JOptionPane.QUESTION_MESSAGE);        double inch = Double.parseDouble(input);                JOptionPane.showMessageDialog(null, "the Meter is: " + inch*PARAMETER);    }}