I started coding small program in Java. I wanted to exercise try-catch block, but i did not even come to that part and got stuck on loop part. I know this is very basic loop
You need a logical and (not or) here
while (choice != 1 || choice != 2) {
System.out.println("Invalid entry, press 1 or 2");
MenuLoop();
}
should be something like
while (choice != 1 && choice != 2) {
System.out.println("Invalid entry, press 1 or 2");
MenuLoop();
}
or (using De Morgan's laws) like
while (!(choice == 1 || choice == 2)) {
System.out.println("Invalid entry, press 1 or 2");
MenuLoop();
}