title: java cannot find symbol method
body: <p>1st</p>
  
  <pre><code>import java.io.*;
  import java.util.*;
  public class MyFile {
  
  public String[] readFiles(String FileName){
          String[] names = new String[]{};
          String line = null;
          try{
          FileReader fileReader = new FileReader(FileName);
          BufferedReader bufferedReader = new BufferedReader(fileReader);
  
          for(int i = 0;(line = bufferedReader.readLine()) != null;i++) {
                      names[i] = line;
                  }   
  
  
          bufferedReader.close();
          }
          catch(IOException ex){
          ex.printStackTrace();
          }
          return names;
  }
  
  public static void write(String FileName,String[] names){
      try{
          FileWriter fileWriter = new FileWriter(FileName);
  
          BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
  
          for(int i = 0; i&lt;names.length ; i++)
          {
              bufferedWriter.write(names[i]);
              bufferedWriter.newLine();
          }
  
          bufferedWriter.close();
          }
  
      catch(IOException ex){
      ex.printStackTrace();
      }
  }
  public MyFile(){System.out.println("");}
  }
  </code></pre>
  
  <p>2nd</p>
  
  <pre><code>public class Book{
  public void displayAll(){
  String[] bookNames;
  String filename = "Books.txt";
  bookNames = readFiles(filename);
  for(int i=0;i&lt;bookNames.length;i++)
  {
  System.out.println(""+bookNames[i]);
  }
  }
  }
  </code></pre>
  
  <p>I'm a beginner in java and I am trying to create a program that will save and read books' name from a txt file.
  but i get this error </p>
  
  <pre><code>Book.java:12: cannot find symbol
  symbol: method readFiles(java.lang.String)
  location:class com.acme.Book
       bookNames = readFiles(filename);
                   ^
  </code></pre>
  
  <p>i did tried to search but i just couldn't find any answer... and by the way not all of the code is written by me..</p>
  
  <p>updated the mistkae (<code>readFiles</code>)</p>