I ve got a string array
a[]={"", "One", "Two", "Three", "Four", "Five", "Six", "Seven",
"Eight", "Nine", };
Ive got a method pass().
Inside tat i call another method display()which has a string array as argument.
But as the index of the string array is long, im getiing error.
How to do this?
public void pass(long number) {
long rm, q;
if (number < 10) {
display(a[number]);
}
if (number > 9 && number < 20) {
display(c[number - 10]);
}
if (number > 19) {
rm = number % 10;
if (rm == 0) {
q = number / 10;
display(d[q - 2]);
} else {
q = number / 10;
display(a[rm]);
display(" ");
display(d[q - 2]);
}
}
}
public void display(String s) {
String t;
t = string;
string = s;
string += t;
}