I'm writing a simple program where the program asks the user to input some strings and a certain output in generated based on the user's input. But when I run the code the I got some error.Errors I've also tried the scanner import but the same exceptions pop up. And when I moved the imports outside of my main I got 3 different errors again.Errors At this moment I don't need the method to be looped or anything, just want to have it so the program can spit out some output based on user's input. Thanks.
public class Question {
public static void main(String arg[]) {
import java.io.BufferReader;
BufferReader br = new BufferReader(new InputStreamReader(System.in));
String input = br.readLine("who's your daddy?");
if (input = "you're my daddy.") {
System.out.println("correct");
else {
System.out.println("try again");
}
}
}
}