当前位置: 代码迷 >> Java相关 >> 菜菜问题~
  详细解决方案

菜菜问题~

热度:298   发布时间:2008-03-20 12:59:37.0
菜菜问题~
--------------------Configuration: <Default>--------------------
D:\java program\work21.java:12: cannot resolve symbol
symbol  : method showMessageDialog  (<*>,double,java.lang.String,int)
location: class javax.swing.JOptionPane
                JOptionPane.showMessageDialog(null,output,"nothing",JOptionPane.INFORMATION_MESSAGE);
                           ^
1 error

Process completed.





import javax.swing.JOptionPane;

public class work21{
    
    public static void main(String[] args){
        
        String tem = JOptionPane.showInputDialog(null,"huashi","nothing",JOptionPane.QUESTION_MESSAGE);
        double temp = Double.parseDouble(tem);
        
        double output = (5.0/9)*(temp-32);
        
        JOptionPane.showMessageDialog(null,output,"nothing",JOptionPane.INFORMATION_MESSAGE);


请问错什么```

[[it] 本帖最后由 mido11 于 2008-3-20 13:01 编辑 [/it]]
搜索更多相关的解决方案: 菜菜  JOptionPane  java  symbol  String  

----------------解决方案--------------------------------------------------------
  相关解决方案