Size of a File
      This programs checks the Size of the file. This is achieved by using the size method of the File class.The result is in bytes.
/*
	http://www.ProbCOMP.com	

	This programs checks the Size of the file. This is achieved by using the 
	size method of the File class.The result is in bytes.

*/

import java.io.File;
import java.io.IOException;

public class FileSize {
	public static void main(String args[]) {

        File file = new File(args[0]);
		long fileLen = file.length();
        System.out.println("The length of file is "+fileLen + " bytes");
        
    }
}
									

Download Program
Did You Know ?
IP address is a numerical label that is assigned to devices participating in a computer network. Read More