List<String> commandList = new ArrayList<String>();
int num = 0;
String command;
command = JOptionPane.showInputDialog(null, "Enter your commands here: ");
while (command.length() > num) {
commandList.add(num, command.substring(num, num+1));
num++;
}
ユーザーに文字列を入力してもらい、文字列の個々の文字をリストに保存したいと思います。
私が今持っているものはそれを正しくしていません。どうすればこれを解決できますか?