Hi All,
I am having a very small issue i.e I am unable to read a data stored in a variable, I created a small function in java as below.
public void Read(String number) throws IOException{
LineNumberReader in = new LineNumberReader(new InputStreamReader(System.in));
System.out.println("EXEC READ "+number);
String Read = “number”;
In CLI it l prints “number” and if I eliminate this “” it speaks only the variable name i.e. if I give 4 it says 4, however it doesn’t speak the value which I entered in the variable i.e. 1234 if I entered this.
System.out.println("EXEC SAYDIGITS " +Read);
in.readLine();
}
Another issue
My SayNumber command is not working properly in CLI it showing the failure result.
My SayNumber method is
public String sayNumber(String number,String escapeDigits ) throws IOException{
LineNumberReader in = new LineNumberReader(new InputStreamReader(System.in));
System.out.println("SAY NUMBER “+number+” " + escapeDigits);
System.err.println("SAY NUMBER “+number+” " + escapeDigits);
String response = in.readLine();
return response;
}
Please help me if there is need to change in the code or different solution.
Thanks & Regards
Ajay Singh Yaduwanshi