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 trialEMANUEL LUCIANO BAZAN
Courses Plus Student 1,116 PointsToast allDoneToast; allDoneToast.makeText(this, "All done!", Toast.LENGTH_LONG).show();
Hi, im having a problem with this code, and i dont know why. I have tried several changes and it wont work can anyone help me out?
Toast allDoneToast;
allDoneToast.makeText(this, "All done!", Toast.LENGTH_LONG).show();
1 Answer
Steve Hunter
57,712 PointsHi there,
The first part of this wants tyou to create the Toast
but not show()
it just yet:
Toast allDoneToast = Toast.makeText(this, "All done!", Toast.LENGTH_LONG);
You can then sow it with:
allDoneToast.show();
The last part of the challenge, you have covered off already - it just wants the Toast created and shown in one line.
I hope that helps.
Steve.
EMANUEL LUCIANO BAZAN
Courses Plus Student 1,116 PointsEMANUEL LUCIANO BAZAN
Courses Plus Student 1,116 PointsGreat! thank you so much for the help!