Explain-why-Buffering-is-extremely-useful-when-outputing-a-file
1. Explain why Buffering is extremely useful when outputing a file. What do we have to remember to do if using a Buffered output writer and why?
2. Correct the error in this code:
private PrintWriter outFile;
outFile = new PrintWriter (nameField.getText());
3. Explain the problem with this code, intended to read every line in a file. Assume that all the variables have been declared:
line = inFile.readLine();
while (line != null) {
textarea.append(line + “n”);
}