/** LineNumberer is the first example program in Chapter 11. It reads a file and prepends each line with a line number. For example, if the following is the input file: Mary had a little lamb whose fleece was white as snow. Every where that Mary went, the lamb was sure to go. Then the following is the output file (ignoring the // comment symbols) */ // /* 1 */ Mary had a little lamb // /* 2 */ whose fleece was white as snow. // /* 3 */ Every where that Mary went, // /* 4 */ the lamb was sure to go. import java.io.File ; import java.io.FileNotFoundException ; import java.io.PrintWriter ; import java.util.Scanner ;

Solved
Show answers

Ask an AI advisor a question