So I have an `ArrayList` of objects that I would like to print to file. I have a `PrintToFile` class, and in another class I have an `ArrayList<Expenses> expList`

Here is my PrintToFile class

```
import java.util.*;
import java.io.*;

public class PrintToFile{
    public void PrintToFile()throws Exception{
      File f = new File ("Output.txt");
      FileWriter fw = new FileWriter(f, true);
     PrintWriter pw = new PrintWriter(fw);
   }

    public void printExp(ArrayList<Expense> expList){
        for(int i = 0; i < expList.size(); i++){
         pw.println("---------------------------------------");//line 13
         pw.println(expList.get(i));
      }
        pw.close();
    }
}

```

and here is my attempt to call to that class in my main class

```
    PrintToFile printer = new PrintToFile();
    printer.print(expList);

```

the first compiler error that I am getting is in my PrintToFile class, it says `PrintToFile.java:13: error: cannot find symbol`, which is the first call to `pw`

Im trying to figure out how to build and structure classes, so that not everything is just stuck in the main method of my main class. So essentially I am trying to create a class that I can always call upon to print an ArrayList.

So my question is, how do I structure the `PrintToFile` class so that my `printExp` method can see the `PrintWriter` `pw` that I created.

Any help would be appreciated, thanks!