public static String addQueryParam(String path,String key,String value){
  return path + (path.contains("?") ? "&" : "?") + key+ "="+ value;
}

public static String addQueryParam ( String path , String key , String value ) { return path + ( path . contains ( "?" ) ? "&" : "?" ) + key + "=" + value ; }
adds query parameter to url .
