Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

noob question java

Name: Anonymous 2009-02-19 15:11

I need to be able to recognize various types of inputs as a "yes" response like y,Yes,YES, etc.. what would be a good place to read up on this and figure out the answer. Is there a string method that can do this simply (like maybe String.equalsIgnoreCase(another yes string))?

Name: Anonymous 2009-02-19 16:21

>>8 this is how i did it. thanks one last time for your help. the notes are for me to finish later.

System.out.println ("The door " +doorRemove +" is EMPTY do you want to switch your choice?(yes/no)");
String switchQuestion = keyboard.next ();
switchQuestion.toLowerCase();
if ((switchQuestion.charAt(0)) == 'y'){
    /* switch the damn door */
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List