PDA

View Full Version : Java Programming


billy_vallejo
06-11-2005, 10:29 AM
Could anyone help me in debugging my Java Program.

I made a program in Java but it has errors although it is running. The program is like this: Java Multiple Quiz. When a User entered the wrong key (for example 5), it prompts that he should press the the right choices. for example (from 1 to 4) and then in the preceeding questions, again, the program prompts the user to enter the right choices this time the program goes to the first question again. because of this the user the user should again take the question which he previously answered.

thanks for your help. :thumbsup:

nikkiH
06-11-2005, 04:40 PM
Hard to help you debug when you don't post any code or errors.
Post the errors you get as well as some code where the errors likely are.
If it's a small program, just post the whole thing.

squirellplaying
06-11-2005, 04:41 PM
Mmm, I'd need to see some code. But it sounds like all you need to do is add a while loop before proceding to the next question.
while(userValue is invalid)
prompt for userValue
update question // you now know that userValue is correct.

suryad
06-11-2005, 07:42 PM
Interesting, so you are reading the input thru the keyboard eh? Thats kind of a pain in Java though it can be done relatively easily...but still a pain. Wonder why that interface has not been improved.