Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Google Exam Associate-Android-Developer Topic 2 Question 52 Discussion

Actual exam question for Google's Associate-Android-Developer exam
Question #: 52
Topic #: 2
[All Associate-Android-Developer Questions]

An overridden method onCreateOptionsMenu in an Activity returns boolean value. What does this value mean?

Show Suggested Answer Hide Answer

Contribute your Thoughts:

Rutha
6 months ago
I remember reading that it has to be true for the menu to show.
upvoted 0 times
...
Herman
6 months ago
I'm not sure, I think it might be C.
upvoted 0 times
...
Zachary
7 months ago
I disagree, I believe it's B.
upvoted 0 times
...
Vinnie
7 months ago
I think the correct answer is A.
upvoted 0 times
...
Lemuel
8 months ago
Haha, Dorthy, you've got it backward! That would be too easy. Android likes to keep us on our toes. A is definitely the right answer here.
upvoted 0 times
...
Dorthy
8 months ago
Wait, are you sure? I thought it was the other way around. Returning false would make the menu visible, and true would hide it. I could be wrong, but that's what I remember from the Android docs.
upvoted 0 times
...
Josphine
8 months ago
Yeah, I agree with Sherman. The documentation clearly states that the method should return true if you want the menu to be shown, and false if you don't. It's a pretty straightforward concept.
upvoted 0 times
Johna
8 months ago
Yeah, I agree with Sherman. The documentation clearly states that the method should return true if you want the menu to be shown, and false if you don't. It's a pretty straightforward concept.
upvoted 0 times
...
Alaine
8 months ago
A) You must return true for the menu to be displayed; if you return false it will not be shown.
upvoted 0 times
...
...
Sherman
8 months ago
Hmm, this is an interesting question. I think the correct answer is A. Returning true means the menu will be displayed, while returning false means it won't be shown. It's all about controlling the visibility of the options menu in the Activity.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77