MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

import java.io.BufferedOutputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

public class MainClass {
    public static void main(String[] args) throws IOException {
        DataOutputStream dos = new DataOutputStream(
                new BufferedOutputStream(new FileOutputStream(new File("temp.tmp"))));
        for (int i = 0; i < 10; i++)
            dos.writeInt(i);
        dos.close();

    }
}