title: How can I call my array to my main class?
body: <p>I have one class called DVD collection and another one called movies. The method with the array that I'm trying to return looks like this:</p>
  
  <pre><code>public class DVDCollection
  {
    public static DVD[] collection;
    public static void searchForDVD( String DVD[], String a) {
      System.out.println("What DVD would you like to search for?");
      Scanner scan = new Scanner(System.in);
  
      a = scan.nextLine();
      int N = DVD.length;
      for (int i = 1; i &lt; N; i++)
        for (int j = i; j &gt; 0; j--)
        if (DVD[j-1].compareTo(DVD[j]) &gt; 0)
        change(DVD, j, j-1);
      else break;
      for (int i = 0; i &lt; DVD.length; i++) {
        System.out.print(DVD[i] + a);
      }
      System.out.println();
    }
  }
  </code></pre>
  
  <p>And I'm trying to call it from my main method like so:</p>
  
  <pre><code>public class Movies
  {
    public static void main (String[] args)
    {
      DVDCollection movies = new DVDCollection();
      movies.searchForDVD(DVD);
    }
  } 
  </code></pre>
  
  <p>But it gives me an error saying cannot find symbol - variable DVD</p>
  
  <p>So what exactly is the problem here?</p>