title: Remove @Override annotation error in Java8
body: <p>I created the following interface with a single method:</p>
  
  <pre><code>public interface Greeting {
  
     public void perform();
  }
  </code></pre>
  
  <p>I was trying to pass an instance of the interface to the greet() method.</p>
  
  <pre><code>public class Greeter {
  
    public void greet(Greeting greeting){
      greeting.perform();
   }
  
   public static void main(String[] args) {       
      Greeter greeter=new Greeter();
   }
  }
  </code></pre>
  
  <p>I created an implementation of Greeting Interface:</p>
  
  <pre><code>public class HelloWorldGreeting implements Greeting {
  
   @Override
   public void perform() {
      System.out.println("Hello World");
  
   }
  }
  </code></pre>
  
  <p>I was getting the error(The method perform() of type HelloWorldGreeting must override or implement a supertype method) with a quick fix as "Remove @Override annotation"</p>
  
  <p>I also checked compiler configuration. It's 1.8 only.</p>
  
  <p><a href="https://i.stack.imgur.com/AvSfs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AvSfs.png" alt="enter image description here"></a></p>
  
  <p>Please let me know why is the error coming or help me fix it. Thanks in advance.</p>