I’m very new to programming and I have extended the AsynTask class like this:
private class HttpCalls extends AsyncTask<Void,Void,JSONObject>
and I have overrided the method like this:
protected JSONObject doInBackground(Void... voids) {
. . .
return jsonObject;
}
but when I call new HttpCalls().execute() I want the return type to be of JSONObject but what I get is :
AsyncTask<Void,Void,JSONObject>
how do I change this to JSONObject. Thanks in advance.
1 Answer