title: String.replace result is ignored?
body: <p>So i'm using IntelliJ and the replace buzzword is highlighted. Most of the tips are over my head so i ignore them, but what i got for this one was that the result of string.replace is ignored. Why?</p>
  
  <p>would i need something like ( <code>string = string.replace(string.charAt(i));</code>)?</p>
  
  <pre><code>import java.util.Scanner;
  
  public class PhoneNumberDecipher {
      public static String phoneNumber;
      public static String Decipher(String string) {
          string = phoneNumber;
          for(int i =0; i&lt;=phoneNumber.length(); i++) {
              if(string.equalsIgnoreCase("A")
                 ||string.equalsIgnoreCase("B")
                 ||string.equalsIgnoreCase("C")) {
                  string.replace(string.charAt(i),'2')
              }
              else if(string.equalsIgnoreCase("D")
                      ||string.equalsIgnoreCase("E")
                      ||string.equalsIgnoreCase("F")) {
                  string.replace(string.charAt(i),'3');
              }
              else if(string.equalsIgnoreCase("G")
                      ||string.equalsIgnoreCase("H")
                      ||string.equalsIgnoreCase("I")) {
                  string.replace(string.charAt(i),'4');
              }
              else if(string.equalsIgnoreCase("J")
                      ||string.equalsIgnoreCase("K")
                      ||string.equalsIgnoreCase("L")) {
                  string.replace(string.charAt(i),'5');
              }
              else if(string.equalsIgnoreCase("M")
                      ||string.equalsIgnoreCase("N")
                      ||string.equalsIgnoreCase("O")) {
                  string.replace(string.charAt(i),'6');
              }
              else if(string.equalsIgnoreCase("P")
                      ||string.equalsIgnoreCase("Q")
                      ||string.equalsIgnoreCase("R")
                      || string.equalsIgnoreCase("S")) {
                  string.replace(string.charAt(i),'7');
              }
              else if(string.equalsIgnoreCase("T")
                      ||string.equalsIgnoreCase("U")
                      ||string.equalsIgnoreCase("V")) {
                  string.replace(string.charAt(i),'8');
              }
              else if(string.equalsIgnoreCase("W")
                      ||string.equalsIgnoreCase("X")
                      ||string.equalsIgnoreCase("Y")
                      ||string.equalsIgnoreCase("Z")) {
                  string.replace(string.charAt(i),'9');
              }
          }
  
          return string;
      }
  
      public static void main(String[] args) {
          Scanner input = new Scanner(System.in);
  
          System.out.println("Please Enter a Phone Number you Wish to Decipher...");
          phoneNumber = input.nextLine();
  
          System.out.print(Decipher(phoneNumber));
      }
  }
  </code></pre>