import javax.swing.JOptionPane;
public class length
{
public static void main(String[]args){
double ft=0;
String ftS;
ftS=JOptionPane.showInputDialog("Enter Meter");
ft=Double.parseDouble(ftS);
String output;
double in=ft*12;
double cm=in*2.54;
double mm=cm*10;
output = String.format("feet is %.2f",ft)+Sring.format("\nfeet to in:%.2f",in)+String.format("\nfeet to cm:%.2f",cm)+String.format("\nfeet to mm:%.2f",mm);
JOptionPane.ShowMessageDialog(null, output);
}
}
エラーは次のとおりです。
length.java:15: error: cannot find symbol
output = String.format("feet is %.2f",ft)+Sring.format("\nfeet to in:%.2f",in)+String.format("\nfeet to cm:%.2f",cm)+String.format("\nfeet to mm:%.2f",mm);
^
symbol: variable Sring
location: class length
length.java:16: error: cannot find symbol
JOptionPane.ShowMessageDialog(null, output);
^
symbol: method ShowMessageDialog(<null>,String)
location: class JOptionPane
2 errors