Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- public class ShowFile {
- public static void main(String[] args) {
- int i;
- FileInputStream fin;
- // First make sure that a file has been specified.
- if(args.length != 1) {
- System.out.println("Usage: ShowFile File");
- return;
- }
- try {
- fin = new FileInputStream(args[0]); // Open a file.
- } catch(FileNotFoundException exc) {
- System.out.println("File Not Found");
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement