Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.FileOutputStream;
import java.io.IOException;

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

        FileOutputStream fos = new FileOutputStream("C://text.txt");

        fos.close();

        // try to write into underlying stream
        fos.write(65);
        fos.flush();
        fos.close();

    }
}