code: public String removeFileExtension(String fileName) {
          
          int dotIndex = fileName.lastIndexOf(".");
          if (dotIndex > 0) {
              fileName = fileName.substring(0, dotIndex);
          }
          
          return fileName;
      }
docs: Removes the file extension (all text after the last '.' character)
  from the specified fileName.
  
  @param fileName the String with an (optional) extension
  
  @return the String param sans extension