I want to scan a sentence that the user types, but I want to scan the words separately and then perform the actions depending on the words the user has put.
}else if(choice.equals("load")){
System.out.println("Enter the name of the file:");
String name = input.next();
loadFile(name);
what I want is the user to type "load file.txt" directly