Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Dennis Adriaansen
2,299 PointsDeclare the 'doInBackground(Object... params)'
I need to declair an protected doInBackground string and return an empty string. Below my code
3 Answers

Paul Stevens
4,125 PointsHello,
For part one of this challenge I have the following code:
private class CustomAsyncTask extends AsyncTask<Object, Void, String>{
}
For part two of this challenge I have this:
private class CustomAsyncTask extends AsyncTask<Object, Void, String>{
@Override
protected String doInBackground(Object... params) {
return "";
}
}
These pieces of code both work as I tried them, although I did have to watch the video again to get it right :D
Hope this helps,
Paul :)

Dennis Adriaansen
2,299 PointsHere I'm getting stuck:
private class CustomAsyncTask extends AsyncTask<Object, Void, String> { protected String doInBackground(Object... arg0) {
}

Paul Stevens
4,125 PointsNo problem :)
Dennis Adriaansen
2,299 PointsDennis Adriaansen
2,299 PointsPaul, Thanks you verry much, I was almost there but sturggle to return a empty string. I saw in your code return """; It makes sense that this make the empty return.
Again: Thank you verry much