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 String getFileSubFix(String fileName) {
        int index1 = fileName.lastIndexOf(File.separatorChar);
        int index2 = fileName.lastIndexOf(".");
        if (index2 <= index1)
            return "";
        return fileName.substring(index2 + 1);
    }
}