Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jan 8th, 2013  |  syntax: Java  |  size: 0.35 KB  |  hits: 39  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. public boolean numCheck(String input, int number)
  2. {
  3.         if(number > input.length())
  4.         {
  5.                 // handle the case where the input String length is shorter than the number param
  6.                 return false;
  7.         }
  8.         // have to subtract one off the number as charAt is indexed starting at 0
  9.         if(Character.isDigit(input.charAt(number - 1))
  10.         {
  11.                 return true;
  12.         }
  13.         return false;
  14. }