当我运行程序时,joption消息对话框不起作用,而且我不确定我的main方法中的代码。
public static void main(String[] args) {
// TODO code application logic here
first();
second();
}
public static String first(String prompt){
String greeting = "Hello, Wolrd!";
int n = greeting.length();
JOptionPane.showMessageDialog(null, greeting);
return prompt;
}
public static String second(String prompt){
String river = "Mississipi";
String bigRiver = river.toUpperCase();
JOptionPane.showMessageDialog(null, river);
return prompt;
}
}