Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.FileInputStream;

public class Main {
    public static void main(String[] argv) throws Exception {
        FileInputStream fin = new FileInputStream("test.txt");
        int i;
        do {
            i = fin.read();
            if (i != -1)
                System.out.printf("%02X ", i);
        } while (i != -1);
        fin.close();
    }
}