code: public static String getFileName(String filePath) {
         int separatorIndex = filePath.lastIndexOf(separator);
         return separatorIndex < 0 ? filePath : filePath.substring(separatorIndex + 1,
      		   filePath.length());
     }
docs: Returns the name of the file or directory represented by this file.
  
  @return this file's name or an empty string if there is no name part in
  the file's path.