Here you can find the source of getFileName(Path path)
public static String getFileName(Path path)
//package com.java2s; //License from project: Open Source License import java.nio.file.Path; public class Main { public static String getFileName(Path path) { return path.getFileName().toString(); }/*from w w w . j a v a 2 s.c o m*/ }