How do i change Object to String in a class which extends AsyncTask?
- by Filip V.
I'm learning from Google's Android developing tutorial and i came across a problem.
On this link https://developer.android.com/training/basics/network-ops/connecting.html#AsyncTask it says to create a class that extends AsyncTask.
So when i write the class it automatically implements the method as follows:
private Object doInBackground(Object... args) {..} //it's fine
but when i try writing just as it says in the tutorial:
private String doInBackground(String... args) {..} //it gives an error
and the error says: The method doInBackground(String...) of type MainActivity.DownloadWebpageText must override a superclass method.
So how do i change Object to String without getting an error there?