code: public static String getExtension(String fileName) {
          if (fileName.contains(".")) {
              return fileName.substring(fileName.lastIndexOf(".") + 1);
          }
          return "png";
      }
docs: Gets the extension of the given file name or <code>"png"</code> if the file name has no extension.
  
  @param fileName The file name.
  @return The extension of the given file.