更新时间:2023-01-14 12:32:13
String类具有toUpperCase()方法.
The String class has a toUpperCase() method on it.
JOptionPane.showInputDialog(..)返回一个字符串,因此您可以使用:
JOptionPane.showInputDialog(..) returns a String, so you can use:
JOptionPane.showInputDialog("Enter name: ").toUpperCase();