import java.util.Scanner; import java.io.*; /** * Read a text file into an array, then output in REVERSE order * to a new file. * * @author YOUR NAME HERE!!!!! */ public class Reverse { public static void main(String[] args) throws IOException { //open file for reading File myInputFile = new File("forward.txt"); Scanner inputFile = new Scanner(myInputFile); String[] lines = new String[26]; // Read in lines and store in array // hint: use a for loop inputFile.close(); //open file for writing PrintWriter outputFile = new PrintWriter("backward.txt"); // Output lines from the array in reverse order // hint: also use a for loop, // but iterate backwards over the array elements outputFile.close(); } }