Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {

    public static String resolveFileNameForPath(String filePath) {
        int index = 0;
        String fileName = "";
        if ((index = filePath.lastIndexOf("/")) != -1)
            fileName = filePath.substring(index + 1);
        return fileName.contains(".") ? fileName : "";
    }
}