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
24 days 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
Leota
3 days ago
I think C is the correct answer.
upvoted 0 times
...
...
Dean
26 days 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
...
Kenny
1 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
King
8 days ago
I think it opens SecondActivity layout.
upvoted 0 times
...
...
Kelvin
2 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
7 days ago
Yes, it doesn't seem to open a new activity.
upvoted 0 times
...
Quentin
9 days ago
I agree, it looks like it re-opens the same layout.
upvoted 0 times
...
Lyla
27 days ago
I believe it refreshes the MainActivity layout.
upvoted 0 times
...
Heike
1 months ago
Yeah, I think so too. It doesn't seem to be opening a new activity.
upvoted 0 times
...
Evangelina
1 months ago
I think the correct answer is C.
upvoted 0 times
...
Beatriz
1 months ago
I agree, it looks like the code snippet is just re-opening the same MainActivity layout.
upvoted 0 times
...
...
Telma
2 months ago
I'm not sure, but I think it moves the 'Hello' message to Second Activity layout.
upvoted 0 times
...
Gail
2 months ago
I believe it re-opens the same MainActivity layout.
upvoted 0 times
...
Alton
2 months ago
I think it opens SecondActivity layout.
upvoted 0 times
...

Save Cancel