Resetting inputs?

I have a program that involves readLine() in a loop.

When the program goes returns to the readLine(), it's value is already determined as the one it was before.

How do I reset my inputs?

System.out.println("Which level would you like to play?");

BufferedReader stdin =new BufferedReader (

new InputStreamReader (System.in));

String levelInput = stdin.readLine().trim().toLowerCase();

String levelAnswer[] ={"1","2","3","4","5","6","7","8","9","10"};

System.out.println(levelInput);

while(count < 10){

if (levelInput.equals(levelAnswer[count])){levelS = count;count=99;}

else{count++;}

[1285 byte] By [Gaurdian_devila] at [2007-10-2 13:56:16]
# 1
?
jverda at 2007-7-13 12:00:18 > top of Java-index,Java Essentials,New To Java...
# 2
also, get rid of that while loop. Just do...levelS = Integer.parseInt(levelInput);
jverda at 2007-7-13 12:00:18 > top of Java-index,Java Essentials,New To Java...
# 3
My problem is that the readLine() doesn't take a second value...It's stuck on the first one.
Gaurdian_devila at 2007-7-13 12:00:18 > top of Java-index,Java Essentials,New To Java...
# 4
> My problem is that the readLine() doesn't take a> second value...> It's stuck on the first one.No it isn't. There is another bug. Could you please post more of what is around the code you did post.
Gaurdian_devila at 2007-7-13 12:00:18 > top of Java-index,Java Essentials,New To Java...
# 5
> My problem is that the readLine() doesn't take a> second value...> It's stuck on the first one.No.Every time you call readLine, it will take another line from System.in.
jverda at 2007-7-13 12:00:18 > top of Java-index,Java Essentials,New To Java...
# 6
Thank you for your help, everybody.I got it to work.
Gaurdian_devila at 2007-7-13 12:00:18 > top of Java-index,Java Essentials,New To Java...
# 7
> Thank you for your help, everybody.> > I got it to work.Care to share what the problem was?
jverda at 2007-7-13 12:00:18 > top of Java-index,Java Essentials,New To Java...
# 8
> > Thank you for your help, everybody.> > > > I got it to work.> > Care to share what the problem was?The code posted was not what was running probably.
jverda at 2007-7-13 12:00:21 > top of Java-index,Java Essentials,New To Java...