File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Error with reading prgm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Error with reading prgm" Watch "Error with reading prgm" New topic

Error with reading prgm

George Han

Joined: Aug 17, 2005
Posts: 17

Thats my code, I tried to do some tests, I first typed 3, so I get to the "That was Not a Name, If you wish to Quit press q or Q" part, But To test it will loop after I press d, instead of Q or q, But IT gives "Enter Name as Last, First I. " And I cant type anything All it gives is this _
Norm Radder
Ranch Hand

Joined: Aug 10, 2005
Posts: 692
To help you see what is happening in your code you need to display the values of the variables. Put some System.out.println() statements in the code that display the contents of all the variables so you can see how they are changed.

Questions regarding your code:
what is the purpose of the variable: counter? Why do you change its value?
What is Yay used for? The name doesn't mean anything. Would a better name be loopControl?
I agree. Here's the link:
subject: Error with reading prgm
It's not a secret anymore!