title: Why isn't the method toLowerCase(); working in my code?
body: <pre><code>import java.util.Scanner;
  
  public class Test
  {
  
      public static void main(String[] args)
      {
          char[] sArray;
  
          Scanner scan = new Scanner(System.in);
  
          System.out.print("Enter a Palindrome : ");
  
          String s = scan.nextLine();
  
  
          sArray = new char[s.length()];
  
          for(int i = 0; i &lt; s.length(); i++)
          {
              s.toLowerCase();
              sArray[i] = s.charAt(i);
              System.out.print(sArray[i]);
          }
  
      }
  }
  </code></pre>