-1
int option=0;
while (option1!=1 || option1!=2){
System.out.println("Give 1 for the first list which includes what we have in our exhibition");
System.out.print("and 2 which we have not:"); // 2 print because i want to show at two different lines
option1= Integer.parseInt(in.nextLine());} // when i give 1 or 2 as an option it doesn't goes out frome the loop
我想重複,直到用戶給出數字1或2 – user3512724
'option!= 1 ||選項!= 2'總是如此,你需要使用'&&'而不是'||'。 – Lee