/********************************************************************/ /* Demonstrates the use of Scanner to read file input and parse it */ /* using alternative delimiters. */ /* Output also sent to a file */ /********************************************************************/ import java.net.*; import java.util.Scanner; import java.io.*; public class replaceText { public static void main (String[]args)throws IOException { String text, changedText; Scanner fileScan, urlScan; fileScan = new Scanner (new File("input.txt")); PrintWriter outputFile=new PrintWriter(new FileOutputStream("output.txt")); //Read and proces each line of the file while(fileScan.hasNext()); { text=fileScan.nextLine(); changedText = text.replaceAll("tutor","thingy"); outputFile.println(changedText); } fileScan.close(); outputFile.close(); } }
im not getting the output........