//判断最后一位是不是1 int n = arr.length; if (arr[n-1] == 1) System.out.println("Alice"); if (arr[n-1] == 0) System.out.println("Bob");