code: public static String getExtension(String fileName) {
      int pos = fileName.lastIndexOf('.');
      if (pos < 0) {
        return "";
      }
      return fileName.substring(pos + 1);
    }
docs: Gets the extension part of the specified file name.
  @param fileName The name of the file to get the extension of.
  @return The extension of the file name.