Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.FileOutputStream;
import java.io.FilterOutputStream;
import java.io.OutputStream;

public class Main {
    public static void main(String[] args) throws Exception {

        // create input streams
        OutputStream os = new FileOutputStream("C://test.txt");
        FilterOutputStream fos = new FilterOutputStream(os);

        // releases any system resources associated with the stream
        fos.close();

        // writes byte to the output stream
        fos.write(65);

    }
}