这是我收到的错误:
The method saySomething(String) in the type Finch is not applicable
for the arguments (Scanner)
代码:
Scanner user_input = new Scanner(System.in);
String userInput;
System.out.println("Enter your two words: ");
userInput = user_input.next();
myf.saySomething(user_input);
我假设 saySomething 方法不接受扫描仪输入,如何将输入转换为字符串?谢谢