title: JAVA Reading from file word by word using BufferedReader
body: <p>I have to read from a file Author|Name|Year I need to store this information into class nodes. I must use BufferedReader and FileReader.</p>
  
  <pre><code>public class Book {
  String author, name;
  int years;
  }
  
  
  import java.io.FileReader;
  import java.io.BufferedReader;
  import java.io.IOException;
  
  
  public class Main {
      public static void main(String[] args) throws Exception{
              Book book1 = new Book();
              FileReader file = new FileReader("C:/Users/ZatoIndustries/Desktop/failas.txt");
              BufferedReader reader = new BufferedReader(file);
              String text = "";
              String line = reader.readLine();
      }
   }
  </code></pre>
  
  <p>Input looks like:<br>
  <code>A|bbbb|2002
   B|cccc|2001
   A|dddd|2000</code></p>