Introduction
Here is the source code for Main.java
Source
//package com.java2s;
import java.io.File;
public class Main {
public static long getFileSize(String fileName) {
long fileSize = 0L;
File file = new File(fileName);
if (file.exists()) {
fileSize = file.length();
}
return fileSize;
}
}