Here’s the error I’m receiving:
The method saySomething(String) in the type Finch is not applicable
for the arguments (Scanner)
Code:
Scanner user_input = new Scanner(System.in);
String userInput;
System.out.println("Enter your two words: ");
userInput = user_input.next();
myf.saySomething(user_input);
I’m assuming the saySomething method doesn’t accept scanner input, how do I convert the input to a string? Thanks
An example of choosing similar variable names, which leads to confusing code like this:
your
saySomething(String)method expects a String as a parameter, currently you are passing scanner.Name you variables something which you can diffrentiate from each other, and are meaningful.