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 4 Question 81 Discussion

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

You have an Android application that consists of two activities (MainActivity and SecondActivity) and you want to pass data in text field (ID: FirstNameJD) of MainAcitivity to SecondActivity. The passed data will appear in SecondActivity inside a TextView widget with Id: HelloMessageJD. You will use Intent to pass this data from MainActivity to SecondActivity. The Following two images include the Android code which will be written in MainActivity.kt and SecondActivity.kt files. Your data will not pass from MainActivity to SecondActivity due to a mistake in the code in SecodActivity.kt. Which of the following choices is a correct solution to make this app run correctly?

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Josefa
5 days ago
I think the answer is B. Replacing `getStringExtra(name)` with `putSiringExtra(name)` in the SecondActivity.kt file should fix the issue. It's a simple typo that's causing the problem.
upvoted 0 times
...
Brendan
14 days ago
I'm not sure about that. I think we need to add an if statement to solve this issue in both files.
upvoted 0 times
...
Holley
15 days ago
The issue here is that the data is being passed incorrectly in the SecondActivity.kt file. The correct solution is to use `getStringExtra(name)` instead of `putSiringExtra(name)`. This will ensure that the data is properly passed from the MainActivity to the SecondActivity.
upvoted 0 times
...
Rosalind
18 days ago
I agree with Ranee. That seems like the right fix to make the data pass correctly from MainActivity to SecondActivity.
upvoted 0 times
...
Ranee
20 days ago
I think the correct solution is to replace getStringExtra(\'name\') with putStringExtra(\'name\') in SecondActivity.kt file.
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