I am looking at example in the example in Walter Savitch book "Java Introduction"
// This method does not do what we want it to do.
public static void openFile(String fileName,
PrintWriter stream) throws FileNotFoundException
{
stream = new PrintWriter(fileName);
}
PrintWriter toFile = null;
try
{
openFile("data.txt", toFile);
}
Author gives explanation, which does not make any sense, as to why toFile = null
after try
Thanks !