Every now and then I see a question from a new programmer that is so far from being correct that it's clear the questioner has not grasped the basics. See http://stackoverflow.com/questions/36709119/java-scanner-class-public-boolean#36709163https://stackoverflow.com/questions/36709119/java-scanner-class-public-boolean#36709163, for example.
My feeling is that an answer would have to be quite a long one, going over many points, to be helpful. My first reaction was to suggest in a comment that the questioner should find a tutor or someone else to show them what to do, since their code was so far from correct that Stack Overflow wouldn't be of much help. But after I wrote that comment, I erased it without submitting. Unlike the homework dumpers, this person actually is trying--they just seem very lost.
What's the best way to handle questions like this?
A lot has happened on that question since I posted here. To see why I think OP was "very lost", you'll need to go to the original revision of the question.
After some suggestions, and some answers from people who just gave the OP correct code, the OP has made some significant changes. Maybe the myriad of different suggestions has helped the OP, and perhaps that's the answer to my question--let everyone find one error and eventually things will get straightened out. But how would the rest of you handle this kind of question?