Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.io.File;

public class Main {
    public static int getFileSize(String fileName) {
        File f = new File(fileName);
        long len = f.length();
        len = len > Integer.MAX_VALUE ? Integer.MAX_VALUE : len;
        return (int) len;
    }
}