Exam AND-401 All QuestionsBrowse all questions from this exam
Question 23

Which method is used to close an activity?

    Correct Answer: B

    To close an activity in an Android application, the method used is 'finish()'. It signals the OS to close the current activity. The 'destroy()', 'stop()', and 'close()' methods do not serve this purpose; 'destroy()' is called by the system when it needs to reclaim resources, 'stop()' pauses the activity but does not close it, and 'close()' is not a recognized method in this context.

Discussion
MmadiOption: B

B. Finish()