Jave Scanner Question!?

Q: How can I have a scanner that you can enter a y/n! Not a #. I have a book that shows you how to use a Scanner but it is only letting me input a number. I can not use a 1=y and 2=n. I need to have a y or n only. if anything else, it should go back to ask for a yes or no. I just need to know how to do it. The code would be nice though.

A: By Java, do you mean the programming language? And what do mean by scanner? a piece of hardware or a virus scanner? Or another idea I have is that you have a scanner that uses some sort of Java code to run it self. Please explain your question better because I have no idea what your talking about.

Related items