Print Total Number Of Lines In A File - Online Code


Count the total number of files in a directory and print total number of lines in each file.

Source Code


public class LineCount


	static public void main(String args[]) throws Exception



		File di   = new File("c:/Prateek");

		File fl[] = di.listFiles();

		int j;

		int count=0
... (login or register to view full code)

To view full code, you must Login or Register, its FREE.

Hey, registering yourself just takes less than a minute and opens up a whole new GetGyan experience.


No comment yet. Be the first to post a comment.