title: getPostDataString(java.util.HashMap<java.lang.String,java.lang.String>) cannot be applied to (java.util.HashMap<java.lang.String,java.lang.String>[])
body: <p>I'm trying to post to a server via Asynchronous Task and while converting Hashmap to String, this error occurred. What does that Error mean. Why does it occour ? How do I resolve this ?
  here is my code:</p>
  
  <pre><code>public class NetworkAccess extends AsyncTask&lt;HashMap&lt;String,String&gt;,Void,String&gt; {
  private URL url;
  private HttpURLConnection con;
  private OutputStream os;
  
  @Override
  protected String doInBackground(HashMap&lt;String, String&gt;... vals) {
      String response = "";
  
      try {
          url = new URL("http://192.168.0.3/chow/user-login.php");
          con = (HttpURLConnection) url.openConnection();
          con.setRequestMethod("POST");
          con.setDoOutput(true);
          con.setConnectTimeout(1000);
          OutputStream os = con.getOutputStream();
          BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os,"UTF-8"));
          String pd = getPostDataString(vals); //Error
          writer.write(pd);
          writer.flush();
          writer.close();
          BufferedInputStream bis = new BufferedInputStream(con.getInputStream());
          BufferedReader r = new BufferedReader(new InputStreamReader(bis));
          StringBuilder total = new StringBuilder();
          String line;
          while ((line = r.readLine()) != null) {
              total.append(line);
          }
          response = total.toString();
      }
      catch (Exception e){
          e.printStackTrace();
  
      return response;
  }
  
  @Override
  protected void onPostExecute(String s) {
      super.onPostExecute(s);
  }
  private String getPostDataString(HashMap&lt;String, String&gt; params) throws UnsupportedEncodingException {
      StringBuilder result = new StringBuilder();
      boolean first = true;
      for(Map.Entry&lt;String, String&gt; entry : params.entrySet()){
          if (first)
              first = false;
          else
              result.append("&amp;");
  
          result.append(URLEncoder.encode(entry.getKey(), "UTF-8"));
          result.append("=");
          result.append(URLEncoder.encode(entry.getValue(), "UTF-8"));
      }
  
      return result.toString();
  }
  </code></pre>
  
  <p>}</p>