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.

Android Build a Simple Android App (2014) Testing and Debugging Making a Toast

Don't forget to call both makeText() and show() for your second Toast notification!

how do you call the two

ToastTest.java
Toast allDoneToast = Toast.makeText(this, "All done!", Toast.LENGTH_LONG);
allDoneToast.show();
Toast.makeText(this, "All done!", Toast.LENGTH_LONG).show();
Toast.makeText(this, "Hey Hey hey Allz done!", Toast.LENGTH_LONG).show();

@MUZ141098 Tendai Matemera can you specify some more ?

2 Answers

The first two lines in your code are correct.

The first line will pass the first part of the challenge, then the second will pass the second.

Give it a go! You've completed the challenge already!

Steve.

Lol i thought so too. But apparently he says it doesn´t work which confuses me cuz it should

If the other lines are present too, it'll probably fail.

Thanks guys I actually had to comment out the third line and up it was running.but with the third line it gives errors.but now I am ok thanks once again. challenge is over.