I am very new to Java and I am trying to make a chat bot. I have a main method then a method with the responses. Although when I try to call the response method in the main method, it highlights the word Response and says: method Response in class ChatCode cannot be applied to given types; required: java.lang.String; found: no arguments; reason: actual and formal argument lists differ in length
public class ChatCode{
public static String main(String input){
Scanner sc = new Scanner(System.in);
System.out.println("Hello!");
input = sc.nextLine();
while(input != ("Bye")){
Response();
}
System.out.println("Bye!");
}
Then this is my response method
public static String Response(String output){
Scanner sc = new Scanner(System.in);
input = input.toLowerCase();
input = input.trim();
String output;
if(input.indexOf("hi!") >= 0
|| ("hi") >= 0
|| ("hello!") >= 0
|| ("hello") >= 0){
output = "Hello!";
}
else if(input.indexOf("whats up?") >= 0
|| ("what's up?") >= 0
|| ("whats up") >= 0
|| ("what's up") >= 0){
output = "Nothing much, how about you?";
}
else if(input.indexOf("how are you?") >= 0
|| ("how are you") >= 0){
output = "I am great, how about you?";
}
return output;
}
Any feedback would be appreciated!!!!