Write a public static method called tokensToLines that will
     Write a public static method called tokensToLines that will read an input file one token at a time using Scanner, and print them to an output file using Print Writer, printing the token number before each token. For example, if the input file has just one line with the content \"in the morning\", tokens To Lines should create a file with the content shown below.  in the morning public static void tokens To Lines R(String in File Name, String out File Name) 
  
  Solution
public static void tokensToLinesR(String inFileName,String outFileName) throws IOException {
Scanner inFile = null;
    PrintWriter outFile = null;
    int token_count=0;
try {
 inFile = new Scanner(new BufferedReader(new FileReader(inFileName)));
    outFile = new PrintWriter(new FileWriter(outFileName, true));
while (inFile.hasNext()) {
                token_count++;
                outFile.printf(token_count+\". \"+inFile.next());
 }
 } finally {
 if (inFile != null) {
 inFile.close();
        outFile.close();  
 }
 }
 }

