public static boolean checkExtension(String query){
  for (  String ext : getExtensions()) {
    if (ext.equals(query)) {
      return true;
    }
  }
  return false;
}

public static boolean checkExtension ( String query ) { for ( String ext : getExtensions ( ) ) { if ( ext . equals ( query ) ) { return true ; } } return false ; }
checks if an extension is supported .
