Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.IOException;
import java.io.FileInputStream;

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

        FileInputStream fis = new FileInputStream("C://test.txt");

        int i = fis.read();

        char c = (char) i;

        System.out.println(c);

        // close file input stream
        fis.close();

    }
}