明解JAVA中的一道题做了很久,没有做出来,寻求大佬帮助

图片说明

public static void main(String[] args) {
string[] arr = {"", "Jan", "Feb", "Mar", "Apr", ... };
Random rand = new Random();
Scanner s = new Scanner(System.in);
int mo = rand.nextInt(12) + 1;
while (true)
{
System.out.println(mo + "月:");
String str1 = s.nextLine();
if (str1.equals(arr[mo]))
{ System.out.println("回答正确"); break; }
else
{ System.out.println("回答错误,再来一次?yes 1 no 0");
String str2 = s.nextLine();
if (str2.equals("0")) break;
}
}
}

问题解决的话,请点下采纳