Package java.io
Class File

Public Method getName

String getName()

_INSERT_METHOD_SIGNATURE_HERE_

Description:

The getName method returns the last name of the file or directory. An empty string is returned if the pathname's name is empty.

Example

   File file = new File("test/directory");
   Logger.log("get name: " + file.getName());

The example above returns the last name of the directory.