Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

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

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

        lnis.setLineNumber(100);

        int i = lnis.getLineNumber();

        System.out.print("Line number: " + i);

    }
}