title: Java: method not working
body: <p>I am creating a program that simulates some people catching fish in a lake, I already created classes for Fish and Pond and I was working on the Fisher class and a method is not working and I'll show the code (I'm new to programming so I'm not sure if I am providing enough information)</p>
  
  <pre><code>public class Fisher {
  
    public static int LIMIT = 3;
    private String     name;
    private Fish[]     fishCaught = new Fish[LIMIT];
    private int        numFishCaught;
    private int        keepSize;
  
    public Fisher(String name, Fish[] fishCaught, int numFishCaught, int keepSize) {
  
      this.name = name;
      this.fishCaught = fishCaught;
      this.numFishCaught = numFishCaught;
      this.keepSize = keepSize;
    }
  
    public String getName() {
      return name;
    }
  
    public Fish[] getFishCaught(){
      return fishCaught;
    }
  
    public int getNumFishCaught() {
      return numFishCaught;
  
    }
  
    public int getKeepSize() {
      return keepSize;
    }
  
    public String toString() {
      return (name + " with " + numFishCaught + " fish");
    }
  
    public void keep(Fish f) {
      if (numFishCaught == LIMIT) {
      } else {
        numFishCaught++;
        fishCaught[numFishCaught-1] = f;
      }
  
    }
  
    boolean likes(Fish f) {
      if ((f.getSize() &gt;= keepSize) &amp;&amp; !(f.getSpecies().equalsIgnoreCase("Sunfish"))) {
        return true;
      }
       return false; 
    }
  
    public void listFish(){
      System.out.println(name + " with " + numFishCaught + " as follows: ");
      for (int i = 0; i&lt;numFishCaught; i++){
        Fish f = new fish[i];
        System.out.println("A " + f.getSize() + " cm " + f.getFishCaught());
      }
    }
  
  }
  </code></pre>
  
  <p>the problem is the listFish() method, it's supposed to return something like this:</p>
  
  <pre><code>Bob with 2 fish as follows:
  A 4 cm Pike
  A 15 cm Bass
  </code></pre>
  
  <p>but it's not working it gives me "incompatible types" and "cannot find symbol" errors??</p>
  
  <p>(just to make your life easier i'll include the Fish class too)</p>
  
  <pre><code>public class Fish {
  
    private String      species;
    private int         size;
  
  
    public Fish(int size, String species) {
      this.size = size;
      this.species = species;
    }
  
  
     public String toString() {
            return " A " + size + " cm " + species;
      }
  
    public String getSpecies() {
      return species;
    }
  
    public int getSize() {
      return size;
    }
  
  
  }
  
  
  Error: /Users/halahalhomoud/Fisher.java:57: incompatible types
  found   : Fish[]
  required: Fish
  File: /Users/halahalhomoud/Fisher.java  [line: 58]
  Error: /Users/halahalhomoud/Fisher.java:58: cannot find symbol
  </code></pre>
  
  <p>EDIT:
  show you how? I used it in the Pond class and it worked fine but I don't get why it's not working here.</p>