Advertisement
ZiphTech

For Waffle

Dec 3rd, 2013
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.45 KB | None | 0 0
  1. /**
  2.  *
  3.  * @author Cujo
  4.  */
  5. public class Validate
  6. {
  7.     static boolean intCheck(String input)
  8.     {
  9.         boolean check = true;
  10.        
  11.         try
  12.         {
  13.             Integer.parseInt(input);
  14.         }
  15.         catch (Exception e)
  16.         {
  17.             System.out.println("Not an integer!");
  18.             System.out.println("Bad stuff is happening.");
  19.             check = false;
  20.         }
  21.        
  22.         return check;
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement