public class HomeWork4 {
public static void main(String[] args) {
 
int schedule = 0x77; 
String[] flag = {"星期天","星期一","星期二","星期三","星期四","星期五","星期六"};
Scanner in = new Scanner(System.in);
System.out.print("请输入你要查询的星期:  ");
String week;

int shift = 0;
while(true){
 week = in.nextLine();

         for(shift = 0 ; shift<=6;shift++){
        if(week==flag[shift])
           break;
         }
          if(shift>6){
           System.out.print("您的输入是错误的,请重新输入:");
                }
}
                  
                   // 下面一步编译不通过。什么原因。该如何解决
 int result = (schedule >> shift) & 0x01;
 if(1 == result)
System.out.println("有航班!!!");

 else
              System.out.println("对不起。没有航班!!!!");
}}
          编译时在int result = (schedule >> shift) & 0x01; 这一步报错是什么原因。怎么解决。