This method of the Path Class retrieves the extension of the file name. If there is no extension, this method returns null.
public static String getExtension(String stPath);
Returns the extension of the file name.