title: Not understanding missing return statement
body: <p>I am new to Java. I am working on a small program practice and getting missing return statement error.</p>
  
  <p>Can anybody help?</p>
  
  <pre><code>import java.util.Scanner;
  class nonstatic1
  {
      public static void main(String[] args)
      {
          // this method works 
          nonstatic2 Ref=new nonstatic2(); 
          int Addition=Ref.add();           
          System.out.println (Addition);     
  
           String email=email();
  
      }
         // the one below is the one that does not work and gives me the error
      public static String email()
      {
          Scanner in=new Scanner(System.in);
          System.out.println("Enter Your email Address");
          String email=in.nextLine();
  
          if(email.endsWith(".sc"))
            return email;
      }
  }
  </code></pre>