MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

import java.io.FileNotFoundException;
import java.io.FileOutputStream;

public class MainClass {
    public static void main(String[] a) {
        FileOutputStream outputFile = null; // Place to store the stream reference
        try {
            outputFile = new FileOutputStream("myFile.txt");
        } catch (FileNotFoundException e) {
            e.printStackTrace(System.err);
        }
    }
}