I created this small loop to test out continuous input. I want to exit when exit is the input. However the while loop I created is still looping even though exit is typed in.
code:
    String input = "";
    while(input != "exit") {
        Scanner sc = new Scanner(System.in);
        input = sc.nextLine();
    }
 
     
    