Advertisement
Guest User

Untitled

a guest
Mar 20th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. if (choicesObjects == b) {
  2. System.out.println("TEST 2");
  3.  
  4. System.out.println("Object: Right triangle");
  5. System.out.println("nEnter length of Right triangle: ");
  6.  
  7. int lengthOfTriangle = 0;
  8.  
  9. try {
  10.  
  11. lengthOfTriangle = input.nextInt();
  12.  
  13. } catch(InputMismatchException e) {
  14.  
  15. System.out.println("nError: user input must be an integer greater than 0.n");
  16. System.out.println("Object: Right triangle");
  17. System.out.println("nEnter length of Right triangle: ");
  18. input.next();
  19.  
  20. }
  21.  
  22. //method stuff
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement