title: Returning a char from a method
body: <p>I don't know what's wrong, but I can't get this method to return the characters I'm wanting it to. I just keep getting an error in the form of red lines under the word 'return'</p>
  
  <p>Here's my method.</p>
  
  <pre><code>public static char getOperator(String fileContent){
  
  
      int checkAdd = fileContent.indexOf('+');
      int checkMinus = fileContent.indexOf('-');
      int checkMulti = fileContent.indexOf('*');
      int checkDivi = fileContent.indexOf('/');
  
      if (checkAdd != -1){
          return char operator = fileContent.charAt(fileContent.indexOf('+')); 
      }   
      else if (checkMinus != -1) {
          return char operator = fileContent.charAt(fileContent.indexOf('-'));
      }
      else if (checkMulti != -1) {
          return char operator = fileContent.charAt(fileContent.indexOf('*'));
      }
      else if (checkDivi != -1){
          return char operator = fileContent.charAt(fileContent.indexOf('/'));
      }
      return 0;
  
  
      }
  </code></pre>
  
  <p>Okay, sorry about that, I had been messing with it in eclipse and didn't catch that issue. However, now the return statements in the ifs still produce errors. How do I fix that?</p>