Java tutorial
//package com.java2s; public class Main { private static String getFileName(String path) { int index = path.lastIndexOf("/"); String fileName = path.substring(index + 1); return fileName; } }