I want to break the loop by a string input . But the program is taking input infinitely.
public static void main(String[] args) {
int i;
String test;
Scanner inputString = new Scanner(System.in);
while(1==1){
test=inputString.next();
if(test=="Break"){
break;}
}
System.out.println("the loop actually broke");
}