Please tell my what ... means in "doInBackground(X...x)"
I have read the excellent answer by Kartik Domadiya on
What arguments are passed into AsyncTask?
and It helps my a lot. However, I still cannot understand the 3 dots in the following. I need some concrete examples.
private class MyTask extends AsyncTask<X, Y, Z>
protected void onPreExecute(){
}
protected Z doInBackground(X...x){
}
protected void onProgressUpdate(Y y){
}
protected void onPostExecute(Z z){
}
If I have to pass more than 1 parameters to doInBackground(), will I just replace X by the type of the first parameter?
For instance, if I will pass three parameters to doInBackground(), with types of int, String, String, respectively , and make a result with a type of String. During the progress update, I will use a String type parameter, will I implement the class like that?
private class MyTask extends AsyncTask<int, String, String> {
protect void onPreExecute() {
}
protect String doInBackground(int ... x) {
}
protect void onProgressUpdate(String y) {
}
protect void onPostExecute(String z) {
}