0

プロンプト ボックスのある joptionpane メニューから文字列入力を取得しようとしている Java プログラムに問題があります。文字列入力を返します。使用しようとして、すべて間違っているかどうかはわかりません

String.parseString(input)

私はこれに関して非常に初心者なので、ヘルプはできるだけ単純にするか、完全に修正する必要があります.

   private static String getStringInput (String prompt) {
         String input = EZJ.getUserInput(prompt);
         return String.parseString(input);
   }


UseCalls.java:27: error: cannot find symbol
         return String.parseString(input);
                      ^
 symbol:   method parseString(String)
 location: class String
 1 error

これは、私がそれを使用しようとしているメニューのサンプルです

    do {

        userInput = mainMenu();

        if (userInput.equals("1")) {
            String name = getStringInput("Name?");
            String address = getStringInput("Address?");
            call[numCalls++] = new Call();
        }
        } while (!userInput.equals("0"));


}

EZJミニメソッドはこちら

public class EZJ {

public static String getUserInput (String prompt) {
    return JOptionPane.showInputDialog(prompt);
}
public static void dialog(String inputValue) {
    JOptionPane.showMessageDialog ( null, inputValue );
}

}
4

3 に答える 3