How can I correct this ?
import java.util.Scanner; public class Char { public static void main (String args[]){ int i,choice; char digit1,digit2; do{ Scanner scan=new Scanner(System.in); System.out.print("Input a value: "); digit1=scan.next().charAt(0); System.out.print("Input another value: "); digit2=scan.next().charAt(0); System.out.print("The letter/s between " +digit1 +" and " +digit2 +" is " ); digit1++; for(char ch=digit1;ch<digit2;++ch) { System.out.print(ch); } System.out.print("\n Another[y/n]: "); choice=scan.next().charAt(0); } while(choice=='y'); Scanner scan=new Scanner(System.in); int ascii=(int) digit2; if(digit2>=48 && digit2>=58 ) { System.out.println("Invalid Input! Please enter the same type of value"); } System.out.print("The number/s between " +digit1 +" and " +digit2 +" is " ); for(i=digit1+1;i<digit2;i++) { System.out.print(i-'0'); } System.out.print("\n Another[y/n]: "); choice=scan.next().charAt(0); while(choice=='y'); } }