code: private String provideRepresentation(int number)
     {
        String key;
  
        if (number == 0)
           key = "zero";
        else if (number < 20)
           key = numNames[number];
        else if (number < 100)
        {
           int unit = number % 10;
           key = tensNames[number / 10] + numNames[unit];
        }
        else
        {
           int unit = number % 10;
           int ten = number % 100 - unit;
           int hundred = (number - ten) / 100;
           if (hundred < 20)
              key = numNames[hundred] + " hundred";
           else
              key = tensNames[hundred / 10] + numNames[hundred % 10] + " hundred";
           if (ten + unit < 20 && ten + unit > 10)
              key += numNames[ten + unit];
           else
              key += tensNames[ten / 10] + numNames[unit];
        }
        return key.trim();
     }
docs: Provides a string representation for the number passed. This method works for limited set of numbers as parsing
  will only be done at maximum for 2400, which will be used in military time format.