I'm a beginner in Java and I'm trying to find out how to create a segment of code that can allow a user to enter a number between 1 and 26, and have the corresponding number of sequential letters to appear?
For example, if the user enters 3 then the computer would output a, b, c
Thank you in advance.
Update: I wrote the following code but there is an error message stating that the i in the integer conversion part is a duplicate of a local variable?
In another method, the user inputs the number between 1 and 26 and I'm reading that input as the String variable "num".
public String getChar (int i){
String num;
String text = mini1Num.getText();
Integer i = Integer.valueOf(text);
return i > 0 && i < 27 ? String.valueOf((char)(i + 'A' - 1)) : null;
}