My program kind of gets stuck after the readLine call, the if statements don't work. What am i doing wrong? #java-first-timer
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.IOException;
public class nums {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Number Mania!!!");
System.out.println("Pick your favourite number from 1 to 5");
String favNum = br.readLine();
if (favNum=="3"){
System.out.println("Your favourite number is three!");
}
else{
System.out.println("hi!");
}
}
}