Tags » words

Number to Words Converter – JAR File – Java

Something useful i think i would share.
The code was originally written by http://www.rgagnon.com/. I made some minute modifications to fit into the Jar mode
You might need to convert Figures to Words, lets say: 365, which converts to “Three Hundred and Sixty Five”. It can go as far as you want it to.
Here’s the JAR file to download: JAR File
Source File

Sample Usage
The convert method is static, so need to instantiate the class. It takes a long data type as its only argument.

int value = 7899;
String valueInString = NumberToWordsConverter.convert((long)value));

Have fun! No point wasting precious time writing lines of codes like this.. whatcha say?!