private boolean hasExtension(final File theFile,final String extension){
  return extension.equals(getExtension(theFile));
}

private boolean hasExtension ( final File theFile , final String extension ) { return extension . equals ( getExtension ( theFile ) ) ; }
returns whether the given file has the given extension
