Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.PrintStream;

public class Main {

    public static void main(String[] args) throws Exception {
        byte c = 70;
        PrintStream ps = new PrintStream("c:/text.txt", "UTF8");

        // write byte c which is character F in ASCII
        ps.write(c);

        // flush the stream
        ps.flush();

    }
}