-
Notifications
You must be signed in to change notification settings - Fork 158
/
FilesInOut.java
34 lines (26 loc) · 1.12 KB
/
FilesInOut.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import java.lang.Number;
/**
*
* CSCU9T4 Java strings and files exercise.
*
*/
public class FilesInOut {
public static void main(String[] args) {
// Replace this with statements to set the file name (input) and file name (output).
// Initially it will be easier to hardcode suitable file names.
// Set up a new Scanner to read the input file.
// Processing line by line would be sensible here.
// Initially, echo the text to System.out to check you are reading correctly.
// Then add code to modify the text to the output format.
// Set up a new PrintWriter to write the output file.
// Add suitable code into the above processing (because you need to do this line by line also.
// That is, read a line, write a line, loop.
// Finally, add code to read the filenames as arguments from the command line.
System.out.println("You need to add your own code to do anything");
} // main
} // FilesInOut