0

I was reading a tutorial on Vogella, and I noticed the notation String... being used in a method declaration. I tried googling it without success. Can somebody explain what it is?

protected String doInBackground(String... urls) {
  String response = "";
  for (String url : urls) {
    DefaultHttpClient client = new DefaultHttpClient();
    HttpGet httpGet = new HttpGet(url);
    try {
      HttpResponse execute = client.execute(httpGet);
      InputStream content = execute.getEntity().getContent();

      BufferedReader buffer = new BufferedReader(new InputStreamReader(content));
      String s = "";
      while ((s = buffer.readLine()) != null) {
        response += s;
      }

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
  return response;
}
Lalit Jain
  • 209
  • 2
  • 8

0 Answers0