Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. //It will ask the user to either accept or reject the offer
  2. public boolean status() {
  3. int temp;
  4. while (true) {
  5. System.out.print("\nAccept or Reject! [1]Accept [2]Reject: ");
  6. temp = userInput.nextInt();
  7. if (temp == 1 || temp == 2) {
  8. break;
  9. }
  10. System.out.println("Error! You must answer either 1 or 2.");
  11. }
  12. System.out.println();
  13. return temp != 1;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement