为什么这里跳不出循环?(无关代码已省略)

class ArrayOption{ private String[] str = new String[100]; public ArrayOption(){ //int jdg; Scanner sc = new Scanner(System.in); System.out.println("input something into the array:"); for(int i = 0;i<str.length;i++){ str[i] = sc.next(); if(str[i] == "break"){break;} }