title: How to ignore case in java when asking for user input in a loop
body: <p>I'm trying to run this program as a loop when the user inputs a "Y" value in. I want the input to ignore the case, so that the user can enter "y" or "n" also. Would I use the equalsIgnoreCase() method? And if so, would I want to change my char to a boolean? I'm still very new to java about a month in, so any help would be appreciated. I've been playing around with this for awhile now and I can't figure it out without at least one error.The fact that I got it to loop at all is a miracle at this point :) </p>
  
  <pre><code>        char Again = 'Y';
          while(Again == 'Y')
          {
              long product = 1, count = 0;
              System.out.println("This program will generate a table of powers of a number.");
              System.out.println("You just have to tell me what number: \n\n");
              System.out.print("Enter an integer please: ");
              int MyNum = Fred.nextInt();
              while(count&lt;5)
              { product = product * MyNum;
                System.out.print(product + ",");
                count = count + 1;
              }
           System.out.println("\nBye for now.....");
           System.out.print("\n\n\n Try another number (y/n)?");
           String Word = Fred.next();
           Again = Word.charAt(0);
          }
  </code></pre>