February 5, 2018

finding right tech

How to Find the End of a File in Java

Easily find the end of file that you are processing. Scanner again has a easier way of doing it. import java.util.*;import java.io.*;public class EndOfFile { public static void main(String args[]) { EndOfFile endOfFile = new EndOfFile(); endOfFile.proceed(); } final String fileName = “/mypc/EndOfFile.java”; private void proceed() { Scanner input =