import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; public class BufferedWriterExample { public static void main(String[] args) throws IOException { String filename = "output.txt"; String[] lines = {"This is the first line", "This is the second line", "This is the third line"}; BufferedWriter writer = new BufferedWriter(new FileWriter(filename)); for (String line : lines) { writer.write(line); writer.newLine(); } writer.close(); } }In this example, we are creating a BufferedWriter object that writes the output to a file called "output.txt". We are then writing three lines of text to the file using the `write()` method and the `newLine()` method to add a new line character after each line of text. Overall, the java.io BufferedWriter is a useful class for writing text to an output stream, and can be used in a variety of applications.