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 trialNikhil` Radhakrishnan
771 PointsCant understand the Question?
You want the sentence to be true, so choose the correct word knowing that otherString is set in the parent onCreate() method.
2 Answers
Paolo Scamardella
24,828 PointsI believe the question is asking you to change the word UNKNOWN to either AFTER or BEFORE. Simply put, is the aString being set before or after otherString(which is declared in the parent class called Activity)? The answer is AFTER because the parent method (super.onCreate(savedInstanceState)) is being called first and once it is done in the parent function it will come back to the MainActivity onCreate function and continue. Always read code line by line...from top to bottom.
aString = "This variable is set AFTER the 'otherString' variable in Activity";
I hope this helps.
Nikhil` Radhakrishnan
771 PointsThankyou Paolo Scamardella :D i had a hard time figuring that out!!
Paolo Scamardella
24,828 PointsNo problem Nikhil`...If this was helpful, please mark this as resolved. Thanks!