Possible Duplicate:
How to convert number to words in java
I have some Java code that takes arguments, converts them to int values, does a little bit of math on them and then outputs them as int values up to 10. I need to take these output int values and convert them to another string.
For example:
int a = 6;
int b = a + 2;
System.out.print(b);
That will print the value 8. I know that I can convert int b to a string:
int a = 6;
int b = a + 2;
String b1 = Integer.toString(b);
System.out.print(b1);
This will turn my int b into String b1, but the output will still be 8. Since my values will only be a number 1 through 10 inclusive, how do I convert these values to their string counterpart (1 = one, 2 = two, etc.) I know that I'll have to declare that the value 8 is String eight, but I cannot figure it out. Am I even going down the right path?