Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Android Exam AND-801 Topic 8 Question 68 Discussion

Actual exam question for Android's AND-801 exam
Question #: 68
Topic #: 8
[All AND-801 Questions]

Assume you are developing an Android app which consists of two activities, MainActivity and SecondActivity. The following image includes part of MainActivity code. This file includes a button that has id "Mybutton". What does the following code snippet do if it is executed after the user taps on the button (id: Mybutton)?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

Sherita
2 months ago
D seems logical, but the code doesn't show any logic for moving the 'Hello' message to the SecondActivity layout. I'll have to go with C on this one.
upvoted 0 times
Marquetta
1 months ago
Yeah, I also think C is the right answer.
upvoted 0 times
...
Marylou
2 months ago
I agree, C seems like the most logical choice.
upvoted 0 times
...
Leota
2 months ago
I think C is the correct answer.
upvoted 0 times
...
...
Dean
2 months ago
Haha, I bet the developers who wrote this code are having a laugh. 'Hey, let's make the button close the app and open the phone's app list, that'll really mess with the users!'
upvoted 0 times
William
30 days ago
User 3: Yeah, it seems like a prank by the developers.
upvoted 0 times
...
Arlyne
1 months ago
User 2: I think it closes the app and opens the phone's applications list.
upvoted 0 times
...
Paola
1 months ago
User 1: That's a funny comment! I wonder what the code actually does.
upvoted 0 times
...
...
Kenny
3 months ago
I'm going with A. The question mentions that the app has two activities, so tapping the button should open the SecondActivity layout.
upvoted 0 times
Malcom
1 months ago
Yes, tapping the button should take you to the SecondActivity.
upvoted 0 times
...
Dorethea
1 months ago
I agree, it should move to the SecondActivity layout.
upvoted 0 times
...
King
2 months ago
I think it opens SecondActivity layout.
upvoted 0 times
...
...
Kelvin
3 months ago
Hmm, I think the correct answer is C. The code snippet seems to be refreshing the MainActivity layout, not opening a new activity.
upvoted 0 times
Jina
2 months ago
Yes, it doesn't seem to open a new activity.
upvoted 0 times
...
Quentin
2 months ago
I agree, it looks like it re-opens the same layout.
upvoted 0 times
...
Lyla
2 months ago
I believe it refreshes the MainActivity layout.
upvoted 0 times
...
Heike
3 months ago
Yeah, I think so too. It doesn't seem to be opening a new activity.
upvoted 0 times
...
Evangelina
3 months ago
I think the correct answer is C.
upvoted 0 times
...
Beatriz
3 months ago
I agree, it looks like the code snippet is just re-opening the same MainActivity layout.
upvoted 0 times
...
...
Telma
3 months ago
I'm not sure, but I think it moves the 'Hello' message to Second Activity layout.
upvoted 0 times
...
Gail
3 months ago
I believe it re-opens the same MainActivity layout.
upvoted 0 times
...
Alton
4 months ago
I think it opens SecondActivity layout.
upvoted 0 times
...

Save Cancel