title: Compile error: Incompatible operand types java.lang.String and char
body: <pre><code>import java.io.*;
  import hsa.Console;
  import java.awt.*;
  
  
      public static void main(String[] args) throws IOException {
          c = new Console();
  
          String sentence;
          String encrypt = "";
          String vowels = "AEIOUaeiou";
          final String PUNCTAUTION = ".,;?!\"\\/\' -";
          StringBuffer removePunctation = new StringBuffer();
          StringBuffer thirdLetters = new StringBuffer();
  
          char tempChar;
  
          //Open The Output File
  
          PrintWriter output;
          output = new PrintWriter(new FileWriter("output.txt"));
  
          c.println("Please enter the sentence you would like to encrypt");
          sentence = c.readLine();
  
  
          for (int i = 0; i &lt; sentence.length(); i++) {
              tempChar = sentence.charAt(i);
  
              if (PUNCTAUTION.indexOf(tempChar) == -1) {
                  encrypt = encrypt + tempChar;
              }
          }
          if (encrypt == 'A') {
              sentence.replace('A', '!');
          } else if (encrypt == 'I') {
              sentence.replace('I', '#');
          } else if (encrypt == 'E') {
              sentence.replace('E', '@');
          } else if (encrypt == 'O') {
              sentence.replace('O', '$');
          } else if (encrypt == 'U') {
              sentence.replace('U', '%');
          }
          c.println(encrypt.toString().toUpperCase());
  
          output.println(encrypt.toString().toUpperCase());
      }
  </code></pre>
  
  <p>I'm trying to remove all punctuation and spaces, and change the vowels AEIOU to !@#$%, but I'm getting an error. I am also trying to output the vowels I replaced from the sentence at the bottom and reverse them.</p>