I am having problem in getting input from the command prompt into my java
application
1) i am using the following code
for(i=1;i<=10;i++)
{
int ans;
BufferedInputStream in=new BufferedInputStream(System.in);
System.out.println("this is Question ("+ i +") Please tell me your
answer");
ans=in.read();
System.out.println("you have Entered....."+ans);
}
problem 1 program prompt only for 9 times and takes first input itself
as "13"
problem 2 how to convert ascii values into actual numbers like when i
enter 1 on key board it shows me 51 and so on i want to get "1" into
variable ans instead of "51"