I want to print all of the letters between two letters using recursion and this is how I did it:
import java.util.*;
public class q24 {
public static void between(char a, char b) {
if (a==b) {
System.out.println(b);
}
else {
System.out.println(a+1);
between((char)(a+1), b);
}
}
public static void main(String[] args) {
between('e','l');
}
}
but it's printing:
102
103
104
105
106
107
108
l
how can I make it print letters?