ユーザーが入力した文をスキャンしたいのですが、単語を個別にスキャンしてから、ユーザーが入力した単語に応じてアクションを実行したいと考えています。
}else if(choice.equals("load")){
System.out.println("Enter the name of the file:");
String name = input.next();
loadFile(name);
私が望むのは、ユーザーが直接「load file.txt」と入力することです