Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDennis 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