Can't Return ArrayList
<p>I'm having problems with a project of mine. It's a virtual database for films. I have two classes, MovieEntry (small, for individual entries) and MovieDatabase (large, and the code below.) I'm getting an error returning my ArrayLists such as in searchYear. It says incompatible types. Why can I not return an ArrayList?</p>

<pre><code>import java.util.ArrayList;
import java.util.Scanner;
import java.io.*;

public class MovieDatabase
{
   private ArrayList&lt;MovieEntry&gt; Database = new ArrayList&lt;MovieEntry&gt;();
   public MovieDatabase(){
       ArrayList&lt;MovieDatabase&gt; Database = new ArrayList&lt;MovieDatabase&gt;(0);
    }

   public int countTitles() throws IOException{
       Scanner fileScan;
       fileScan = new Scanner (new File("movies.txt"));
       int count = 0;
       String movieCount;
       while(fileScan.hasNext()){
           movieCount = fileScan.nextLine();
           count++;
        }
       return count;
    }

   public void addMovie(MovieEntry m){
       Database.add(m);
    }

   public ArrayList&lt;MovieEntry&gt; searchTitle(String substring){
       for (MovieEntry title : Database)
          System.out.println(title);
          return null;
    }

   public ArrayList&lt;MovieEntry&gt; searchGenre(String substring){
       for (MovieEntry genre : Database)
          System.out.println(genre);
          return null;
    }

   public ArrayList&lt;MovieEntry&gt; searchDirector (String str){
       for (MovieEntry director : Database)
          System.out.println(director);
          return null;
    }

   public ArrayList&lt;MovieEntry&gt; searchYear (int yr){
       ArrayList &lt;String&gt; yearMatches = new ArrayList&lt;String&gt;();
       for (MovieEntry m : Database)
       m.getYear(yr);
        if(yearMatches.contains(yr) == false){
           String sYr = Integer.toString(yr);
           yearMatches.add(sYr);
        }
       return yearMatches;
    }

   public ArrayList&lt;MovieEntry&gt; searchYear(int from, int to){
       ArrayList &lt;String&gt; Matches = new ArrayList&lt;String&gt;();
       for(MovieEntry year : Database);
          Matches.add();
       return Matches;
    }

   public void readMovieData(String movies){
       String info;
       try{
           Scanner fileReader = new Scanner(new File(movies));
           Scanner lineReader;

           while(fileReader.hasNext()){
               info = fileReader.nextLine();

               lineReader = new Scanner(info);
               lineReader.useDelimiter(":");

               String title = lineReader.next();
               String director = lineReader.next();
               String genre = lineReader.next();
               int year = lineReader.nextInt();
            }

        }catch(FileNotFoundException error){
            System.out.println("File not found.");

        }catch(IOException error){
            System.out.println("Oops! Something went wrong.");
        }
    }

   public int countGenres(){
    ArrayList &lt;String&gt; gList = new ArrayList&lt;String&gt;();
    for(MovieEntry m : Database){
      String g = m.getGenre(g);
      if(gList.contains(g) == false){
        gList.add(g);
      }
      return gList.size();
    }
    }

    public int countDirectors(){
     ArrayList &lt;String&gt; dList = new ArrayList&lt;String&gt;();
     for(MovieEntry m : Database){
        String d = m.getDirector(d);
        if(dList.contains(d) == false){
            dList.add(d);
        }
        return dList.size();
     }

     }

    public String listGenres(){
        ArrayList &lt;String&gt; genreList = new ArrayList&lt;String&gt;();
    }




}
</code></pre>
