title: Class is not abstract and does not override abstract method in superclass
body: <p>I am working on a generic implementation of the Genetic Algorithm.
  I'm trying to extend a specific Individual for the knapsack problem from the abstract class Individual</p>
  
  <pre><code>package GenericGA;
  
  public abstract class Individual {
  
      private double fitness;
      private double probability;
  
  
      public double getFitness() {
          return fitness;
      }
  
      public double getProbability() {
          return probability;
      }
  
      public void updateProb(double totalFitness){
          probability = fitness/totalFitness;
      }
  
  
      abstract void updateFitness();
      abstract Individual crossover(Individual partner);
      abstract void mutate(double mutationRate);
  
  }
  </code></pre>
  
  <p>This is the extended class</p>
  
  <pre><code>package GenericGA.SpecificImplementations;
  
  
  import GenericGA.Individual;
  
  public class KnapsackIndividual extends Individual {
  
  
      void updateFitness(){
  
      }
  
      Individual crossover(Individual partner){
          return null;
      }
  
      void mutate(double mutationRate){
  
      }
  
      public static void main(String[] args){
          System.out.println("Hello");
      }
  
  }
  </code></pre>
  
  <p>Since I was using intellij and it was giving me the error, I thought that could be a problem of the IDE, so I compiled with javac and I get the same error: </p>
  
  <pre><code>GenericGA.SpecificImplementations.KnapsackIndividual is not abstract and does not override abstract method mutate(double) in GenericGA.Individual
  </code></pre>
  
  <p>There are no spelling mistakes and the signatures are correct, and I get the error also for the other abstract methods when removing the mutate method that is giving the error.</p>
  
  <p>Moreover if I use @Override on top of the methods, it says </p>
  
  <pre><code>Method does not override method from its superclass
  </code></pre>
  
  <p>What am I missing here?</p>
  
  <p>Thanks in advance.</p>